user = debian-sys-maint
password= eSHSYdfO3fdBvqqG
1
2
然后执行命令:
mysql -u debian-sys-maint -peSHSYdfO3fdBvqqG
1
注意:-p后面直接连接密码。
5、修改密码
接着执行:
use mysql;
update mysql.user set authentication_string=password('ms-1234') where user='root' and Host ='localhost';
update user set plugin="mysql_native_password";
update user set host="%" where user="root";
flush privileges;
exit;
1
2
3
4
5
6
注意:ms-1234,按实际情况修改为你的密码。