Ali RDS after new user, set the new permissions only one database permissions, after setting, still can access all the database, permissions do not take effect
When only one database is authorized,
Global permissions not selected, is for all, select only Object permissions
You do not select Server-level permissions, only the object permissions will be fine.
1. For example, global permissions are not selected, for all databases
2. The host time can be empty, you can also fill in% or fill localhost
Show grants for account name time error
There is no such grant defined for the user ' T2 ' on host '% '
When authorizing, the host does not fill in% or localhost reasons
3. Object permissions may require the reload and file permissions to be removed and then executed.
4. Related commands:
View the specific authorization information below:
View all: Show grants
View a user's: Show grants for account name
Select User,host from Mysql.user where user= ' pos ';
Remove the reload and file permissions, and then execute.
/* General Settings */
CREATE USER ' pos ' @ '% ' identified by ' xxx ';
/* Advanced Settings */
/* Server Permissions settings */
/* Database Permissions settings */
GRANT select,insert,update,references,delete,create,drop,alter,index,trigger,create VIEW,SHOW VIEW,EXECUTE,ALTER Routine,create routine,create Temporary tables,lock tables,event on ' pos '. * to ' pos ' @ '% ';
Grant all on * * to [email protected];
5. Authorized access to the instance:
You see, is it convenient to authorize us to access your instance to create. Authorization steps: You log in to data management, Https://dms.console.aliyun.com/#/dms/rsList, and then in instance management, locate your instance. Then click "Authorized User"-add user, account type select "Master Account", enter my [email protected], click OK. After authorization: You provide the login account and password to create the account, we create the next look
1, please feedback under the authorization of which account, which library, which library is not authorized.
2. Execute show grants for account name; You feedback the results, see the specific licensing information.
This error indicates that in the user table there is no ' pos ' @ '% ' This authorized account, please execute the next SQL, feedback results.
Select User,host from Mysql.user where user= ' pos ';
Hello, you
/* General Settings */
CREATE USER ' pos ' @ '% ' identified by ' XX ';
/* Advanced Settings */
/* Server Permissions settings */
GRANT SELECT, INSERT, UPDATE, DELETE, create, DROP, RELOAD, PROCESS, FILE, REFERENCES, INDEX, ALTER, CREATE temporary tabl ES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, create VIEW, SHOW view, create ROUTINE, ALTER ROUTINE, CR Eate USER, EVENT, GRANT OPTION, TRIGGER on * * to ' pos ' @ '% ';
/* Database Permissions settings */
GRANT select,insert,update,references,delete,create,drop,alter,index,trigger,create VIEW,SHOW VIEW,EXECUTE,ALTER Routine,create routine,create Temporary tables,lock tables,event on ' pos '. * to ' pos ' @ '% ';
Ali rds New User set permissions for only one database