linux 下 修改mysql的权限和密码

权限问题,授权 给 root  所有sql 权限

   grant all privileges on *.* to root@"%" identified by "你的密码";

   flush privileges;

方法二:
通过登录mysql系统,
# mysql -uroot -p
Enter password: 【输入原来的密码】
mysql>use mysql;
mysql> update user set password=passworD("test") where user='root';
mysql> flush privileges;
mysql> exit;   

原文地址:https://www.cnblogs.com/zpbk/p/7837287.html