mysql user management idiosyncracies
Ok, we are all used to adding new user in mysql with following command:
GRANT ALL ON [db].* TO [user].’%’ IDENTIFIED BY ‘[PASS]‘
So, what happens when you added user before creating the said database. Well, as I found out, mysql won’t complain. Oh well, so what happens if you create the database for the user after the fact. No, it won’t back fix the privileges.
So, I had to delete and recreate the user. Having not done this before, I just tried:
DROP USER [user]
and it worked! The only caveat here is if you added the original user for a particular host, you have to specify host when deleting, like this:
DROP User [user]@’[host]‘
Re-creating the user fixed the problem.
Enjoy!
No related posts.
Related posts brought to you by Yet Another Related Posts Plugin.





