Reputation: 1418
I followed this post Grant on multiple databases. MySQL to be able to grant permissions over multiple databases to a mysql user. But I also want to make sure that these permissions persist when a new databases is added to the mysql server. Is there a way to do this?
Upvotes: 3
Views: 1685
Reputation: 1583
If you grant all database and all table access to any MySQL user while creating then user can access all database/table created after creation of user account.
GRANT ALL PRIVILEGES ON *.* TO 'user'@'host' WITH GRANT OPTION;
Upvotes: 9
Reputation: 1776
You can use
GRANT ALL PRIVILEGES ON *.* TO 'user'@'hostname';
. represents database.table. * indicates all databases and all their tables.
Upvotes: 0