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';
注意:新版请使用
update user set authentication_string=password('root') where user='root' ;
mysql> flush privileges;
mysql> exit;
浙公网安备 33010602011771号