- 通过root账户,输入用户名密码后登入mysql
1.选择数据库
use mysql;
2.将其进行更改
update user set authentication_string=PASSWORD('root'),plugin='mysql_native_password' where user='root';
3.刷新
flush privileges;
- 重启mysql
1.linux下依次输入
service mysql stop;
service mysql start;
1.选择数据库
use mysql;
2.将其进行更改
update user set authentication_string=PASSWORD('root'),plugin='mysql_native_password' where user='root';
3.刷新
flush privileges;
1.linux下依次输入
service mysql stop;
service mysql start;