给用户test 赋予数据库 demo 的访问权限grant all privileges on demo.*to 'test'@'%' identified by 'testpwd';flush privileges;revoke 删除用户权限通用写法revoke权限列表 on 库.表 from 用户名@'主机';flush ...
给用户撤销mysql数据库下所有表的所有权限revoke all on mysql.*from xiaojie;FLUSH PRIVILEGES;撤销create权限revoke create on*.*from xiaojie&64;39;39;FLUSH PRIVILEGES;查看权限 show grants for xiaojie;
三、撤销已赋予给 MySQL 用户的权限revoke 跟 grant 的语法差不多&xff0c;只需要把关键字“to”换成“from”即可&xff1a;grant all on*.*to dba&64;localhost;revoke all on*.*from dba&64;localhost;四、grant、...
grant 权限 on 数据库对象 to 用户 一、grant 普通数据用户,查询、插入、更新、删除 数据库中所有表数据的权利 grant select on testdb.*to common_user@’%’ grant insert on testdb.*to common_user@’%’ grant...
grant 权限 on 数据库对象 to 用户 一、grant 普通数据用户,查询、插入、更新、删除 数据库中所有表数据的权利 grant select on testdb.*to common_user@’%’ grant insert on testdb.*to common_user@’%’ grant...
revoke权限 on 数据库名.表名 from 用户名@登陆方式;范例3: 撤销用户tom从本机访问数据库auth的所有权限 mysql>revoke all on auth.*from tom@'localhost';Query OK,0 rows affected(0.00 sec) tom@*:*...