MySQL - Create a user with access to just one database
Quick Tip: I wanted a user with access to just one database so I looked up the docs and ran:
But when I logged in as this user, he could see all the databases. The only way to give the user full access to just one database, so far as I can see is by spelling out what the user can do with
GRANT ALL ON mydatabase.* TO username@"%"
IDENTIFIED BY 'mypassword';
But when I logged in as this user, he could see all the databases. The only way to give the user full access to just one database, so far as I can see is by spelling out what the user can do with
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER ON mydatabase.* TO username@"%"
IDENTIFIED BY 'mypassword';


Peter Coppinger aka Topper is a neurotic web monster who spends most of his chaotic life developing ColdFusion web applications when not drinking himself into a stupor and scheming his plans for world dominance.