mysql 更改root密码及查询用户权限
5.7.27版本更新语法
use mysql;
UPDATE mysql.user SET authentication_string=PASSWORD('passwd') where USER='root';
flush privileges; (刷新权限)
select * from mysql.user where user='root' \G; 查询某个具体用户的权限
SELECT DISTINCT CONCAT('User: ''',user,'''@''',host,''';') AS query FROM mysql.user; 查询所有用户权限
无可奈何花落去,似曾相识燕归来