mysql赋权

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






发布了196 篇原创文章 · 获赞 5 · 访问量 3461

猜你喜欢

转载自blog.csdn.net/weixin_45010894/article/details/103914949