Make sure the user has the appropriate permissions to the database. You can do this by logging in as root and executing:
GRANT ALL PRIVILEGES ON mydatabase.* TO 'myuser'@'localhost'; FLUSH PRIVILEGES;