Mysql给用户授予数据库表权限

生产环境读写权限用户无法访问其它用户创建的数据库及表,才想起来忘记给目标用户授权了,owner用户创建完数据库及表后给读写权限用户授予权限,授权语句如下:
grant all privileges on databaseName.* to targetUserName@"%" identified by 'targetPassword';
grant select,delete,update,insert on databaseName.* to targetUserName@"%" identified by 'targetPassword';
grant select on databaseName.* to targetUserName@"%" identified by 'targetPassword';

你可能感兴趣的:(mysql)