In my PHP script, I\'m accessing two databases db1 and db2. I have a user myuser@localhost that can access db1 but can\'
db1
db2
myuser@localhost
If you haven't done that already, you need to run flush privileges so that mysql knows there was a change and reloads the privileges table for users:
flush privileges
mysql
FLUSH PRIVILEGES;