mysql - 重置密码

访问量: 472

参考:https://stackoverflow.com/a/42539205/445908

service mysql stop
mysqld_safe --skip-grant-tables &
mysql -u root

mysql> use mysql;
mysql> update user set authentication_string=PASSWORD("YOUR-NEW-ROOT-PASSWORD") where User='root';
mysql> flush privileges;
mysql> quit

# service mysql stop
# service mysql start
$ mysql -u root -p

订阅/RSS Feed

Subscribe

分类/category