sudo su
mysqld_safe --skip-grant-tables --skip-networking &
UPDATE mysql.user SET password=PASSWORD(’新密码’) WHERE User=’root’;
mysql> FLUSH PRIVILEGES
update mysql.user set authentication_string=password(‘root‘) where user=‘root‘ ;
时间: 2024-10-29 13:35:17