mysql grant 授权
授权格式如:grant 权限 to 数据库对象 on 用户
-
- grant 授权用户增删改查权限: grant select, insert, update, delete on testdb.* to sky_user@'%'
- grant 数据库开发人员,创建表、索引、视图、存储过程、函数等权限。grant create on testdb.* to developer@'192.168.0.%';grant alter on testdb.* to developer@'192.168.0.%';grant drop on testdb.* to developer@'192.168.0.%';
- 授权某个用户对该库的所有权限grant all on *.* to 用户@'%'执行刷新:flush privileges
- 赋予任何主机访问数据库的权限GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION