mysql的全局权限GLOBAL PRIVILEGES

在执行付权限时
GRANT CREATE,ALTER,DROP,LOCK TABLES,RELOAD,PROCESS ON dbName.* TO username@'%' IDENTIFIED BY 'password';

碰到如下错误:
Error Code : 1221
Incorrect usage of DB GRANT and GLOBAL PRIVILEGES

查了一下RELOAD,PROCESS二个是全局权限,运行环境是服务管理器,改为如下即可:
GRANT CREATE,ALTER,DROP,RELOAD,LOCK TABLES,PROCESS ON *.* TO username@'%' IDENTIFIED BY 'password';

存储过程要用到的权限:CREATE ROUTINE,ALTER ROUTINE,EXECUTE。
参考官网:[url]http://dev.mysql.com/doc/refman/5.1/en/privileges-provided.html[/url]

你可能感兴趣的:(mysql)