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 密码;


 

你可能感兴趣的:(Thinkphp,PHP,Laravel,MySQL)