MySQL password reset
5.1 Modify the configuration file to be free of authorization
___________________________________________________________
[[email protected] ~]# mysqladmin -uroot password ' 111qqq ... ' [[email PROTECTED] ~]# MYSQL -UROOT -P111QQQ ... [[email protected] ~]# vim /etc/my.cnf[[email protected] ~]# /etc/init.d/ mysqld restartshutting down mysql. success! starting mysql. success! [[email protected] ~]# mysql mysql> update user set password= Password (' 111qqq ... ') where user= ' root '; mysql> select * from user where user= ' root ' \g; [[email protected] ~] #vim /etc/my.cnf # Delete the following content skip-grant [[email protected] ~]#/etc/init.d/mysqld restart[[email protected] ~]# mysql #无法登录ERROR 1045 (28000): access denied for user ' root ' @ ' localhost ' (using password: no) [[email prOTECTED] ~]# MYSQL -UROOT -P111QQQ ...
This article is from the "Fuqin Wine" blog, please make sure to keep this source http://szk5043.blog.51cto.com/8456440/1762963
MySQL password reset