1 2 3 4 5 |
/etc/init.d/mysql stop 停止mysql服务 mysqld --skip-grant-tables 不使用密码登陆 /etc/init.d/mysql start 重启mysql |
1 |
update mysql.user set authentication_string=password('123456') where host='localhost' and user='root'; |
1 |
flush privileges; |