Return MySQL root password

xiaoxiao2021-03-05  35

# / etc / rc.d / init.d / mysql stop

# / usr / local / mysql / bin / mysqld_safe --skip-grant-Table &

# / Usr / local / mysql / bin / mysql -u root

Mysql> Use mysql

MySQL> Update User Set Password = Password ('newpassword') where user = 'root';

mysql> flush privileges;

You can restart

转载请注明原文地址:https://www.9cbs.com/read-32174.html

New Post(0)