systemctl stop mysqld systemctl set-environment MYSQLD_OPTS="--skip-grant-tables" systemctl start mysqld mysql -u root UPDATE mysql.user SET authentication_string = PASSWORD('MyNewPassword') WHERE User = 'root' AND Host = 'localhost'; FLUSH PRIVILEGES; quit;
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/tech/database/3850.html