linux安装mysql出现这个错误不用怕,
解决办法: 重新设置root用户密码
# service mysql stop
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking & //(跳过授权表访问)
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('newpassword') where USER='root'; 把newpassword改成自己的密码
mysql> FLUSH PRIVILEGES;
mysql> quit
# service mysql restart
# mysql -uroot -p
Enter password: <输入新设的密码newpassword>
mysql>
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
就可以使用了