Let MySQL users create databases, but allow access to only their own databases
Posted
by eikes
on Stack Overflow
See other posts from Stack Overflow
or by eikes
Published on 2010-06-01T13:18:59Z
Indexed on
2010/06/01
13:23 UTC
Read the original article
Hit count: 503
mysql
I want to have multiple a MySQL users to be able to issue commands like
CREATE DATABASE dbTest;
But I also want each of these users to be able to see and access only their own databases.
All I could find was how to either create the databases by a DBA and grant the privileges on this database to the specific user:
GRANT ALL PRIVILEGES ON dbTest.* TO 'user';
or grant privileges on all databases to a user:
GRANT ALL PRIVILEGES ON *.* TO 'user';
But neither is what I want, because it needs to scale and be secure.
© Stack Overflow or respective owner