时间:2021-07-01 10:21:17 帮助过:4人阅读
1.先关闭mysql服务
xiaopeng# /etc/init.d/mysqld stop
2.输入操作命令
xiaopeng# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
3.连接mysql
xiaopeng# mysql -uroot mysql
mysql> update user set Password=PASSWORD(‘newpassword‘) where USER=‘root‘;
mysql> flush PRIVILEGES;
mysql> quit
4.重启mysql服务
xiaopeng# /etc/init.d/mysqld restart
xiaopeng# mysql -uroot -p
Enter password:<newpassword>
Mysql登录出错 user root@localhost(using password:NO)
标签:sql word 环境 stop using init 登录出错 date use