找到mysql所在目录
mysqld --skip-grant-tables
mysql -uroot -p
回车,回车,
use mysql;
update user set authentication_string = password(‘123456’), password_expired = ‘N’, password_last_changed = now() where user = ‘root’;
flush privileges;
quit;
重启mysql
找到mysql所在目录
mysqld --skip-grant-tables
mysql -uroot -p
回车,回车,
use mysql;
update user set authentication_string = password(‘123456’), password_expired = ‘N’, password_last_changed = now() where user = ‘root’;
flush privileges;
quit;
重启mysql