Linux MySQL forgotten password solution

Copyright: please indicate the source https://blog.csdn.net/baidu_25104885/article/details/90318003

Find a user and password in the Account /etc/mysql/debian.cnf in use

mysql -udebian-sys-maint -p

After logging

>use mysql;
>update user set authentication_string=password('新密码'),plugin='mysql_native_password' where user='root';

Take effect after the restart mysql

Guess you like

Origin blog.csdn.net/baidu_25104885/article/details/90318003