ubuntu mysql5.7 解决不用密码也能登录

登录mysql mysql -u root -p 或 mysql

use mysql;

update user set authentication_string=PASSWORD(“密码”) where user=‘root’;

update user set plugin=“mysql_native_password”;

flush privileges;

quit;

/etc/init.d/mysql restart;

mysql -u root -p 密码;

作者:YuYan_wang
来源:CSDN
原文:https://blog.csdn.net/YuYan_wang/article/details/79515940
版权声明:本文为博主原创文章,转载请附上博文链接!

猜你喜欢

转载自blog.csdn.net/liwei_well/article/details/84644261