1、mysql操作权限可查看information_schema表;
2、cmd查询当前用户操作权限命令: show grants;
3、cmd查询某某用户操作权限命令:show grants for username;
3、cmd回收用户操作权限命令:revoke all privileges on *.* from user@'host';
4、cmd增加用户操作权限命令:
a、首先创建用户:create user username IDENTIFIED BY 'password'; //IDENTIFIED BY 将纯文本密码加密作为散列值存储
b、grant all privileges on databasename.tablename(或者所有数据库中的所有表*.*) to user@‘host’;
5、cmd更新命令:flush privileges;
注:host可使用IP、localhost、127.0.0.1、以及‘%’符号,‘%’符号代表所有;
注:任意操作之后想立即看到效果可即刻使用cmd更新命令;
注:host可使用IP、localhost、127.0.0.1、以及‘%’符号,‘%’符号代表所有;