1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| INSERT,SELECT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE
with grant option
grant all on *.* to root@'10.0.0.%' identified by '123' with grant option; grant all privileges on *.* to 'root'@'localhost' identified by '123' with grant option; 权限 作用对象 归属 密码
INSERT,SELECT, UPDATE
grant all on *.* [当前MySQL实例中所有库下的所有表] grant all on wordpress.* [当前MySQL实例中wordpress库中所有表(单库级别)] (常用) grant all on wordpress.user [当前MySQL实例中wordpress库中的user表(单表级别)]
mysql> grant insert,select(user,host), update on mysql.user to dev1@'localhost' identified by '123';
开发 -> 开发总监 -> 运维总监 -> 你 1.用户名 2.从哪连 3.密码 4.用户 5.操作的库表
|