mysql赋权

自古美人都是妖i 提交于 2020-01-25 04:22:44

mysql常用命名
登录
mysql -u root -p
查看版本字符集
status
查看连接状态
show processlist;
查看路径
show global variables like ‘socket’;

权限管理
show privileges;
show grants;

help grant;

mysql> grant select on *.* 'root'@'%' identified by '123456' with grant option;

mysql> show grants for 'root'@'%'


或者
create user 'root'@'%' identified by '123456' ;
grant select on *.* to 'root'@'%' with grant option;

撤销权限
revoke all on *.* from 'root'@'%';

查看库,表.列权限mysql.user mysql.db mysql.tables_priv
select *from mysql.user where user='rube'\G






易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!