ubuntu安装mysql没有输入密码,无法登录问题

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_35529801/article/details/81984498

sudo vim /etc/mysql/debian.cnf

默认的登录名和密码就是上面的debian-sys-maint,先使用这个登陆上去修改root的密码

update mysql.user set authentication_string=PASSWORD('haojunjie'), plugin='mysql_native_password' where user='root';

然后重启msyql即可登录    service mysql restart 即可登录

猜你喜欢

转载自blog.csdn.net/qq_35529801/article/details/81984498