To elaborate on mwasif's point...
You define in your GRANT statement's ON clause which databases the user can use. Any database you do not specify will not be accessible, whether it currently exists or not.
So, because you do:
- GRANT ALL PRIVILEGES ON databasename.* ...
your user only has access to the database named
"databasename". Trying to create - or in any other way use - another database will fail with the error you posted.
If you want the user to have access to another database, you will need to issue another GRANT statement for that database, or give the user global access by using the wild-card char (*).
- GRANT ALL PRIVILEGES ON *.* ...
Be careful with this though, because it gives the user access to all databases, tables and columns, which is usually not a good idea.