I need to give permissions to all users for a database,

I m trying to do this using following statement:

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES ON `kdb`.* TO ' '@'%'; 

but it gives me error:

ERROR 1133 (42000): Can't find any matching row in the user table

Can anyone tell me how can I give permission to all available users to a particular database, so that every time a new user is created it get access to the that database?

有帮助吗?

解决方案

GRANT ALL PRIVILEGES ON . TO 'myuser'@'%' WITH GRANT OPTION;

This user is a "Super User" and it can be connected from any host to MySQL server you can specify a specific IP instead of %

其他提示

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE(TEMPORARY) ON `kdb`.* TO ''@'%'; 

I think this will resolve your problem

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top