When installing Ucenter and Ucenter home based on lamp architecture under redhat6.5, enter the graphical interface when installed. When you connect to MySQL, enter the root password error, enter MySQL on the terminal can not enter the database. See
650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M01/8E/91/wKioL1jF_rbQ8lluAAAf5t86lD0867.png-wh_500x0-wm_ 3-wmp_4-s_1467922385.png "title=" Mysqlerror. PNG "alt=" Wkiol1jf_rbq8lluaaaf5t86ld0867.png-wh_50 "/>
With mysqladmin also cannot change root password, after looking up the information to find the following command, solve the problem.
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M00/8E/93/wKiom1jF_xmRMafbAAAxNPMvGLw391.png-wh_500x0-wm_ 3-wmp_4-s_483395085.png "title=" MySQL. PNG "alt=" Wkiom1jf_xmrmafbaaaxnpmvglw391.png-wh_50 "/>
mysql_safe--user=mysql--skip-grant-tables--skip-networking (enter MySQL safe mode)
Note that the input command will stop at this screen, then do not control it, do not press CTRL + C end.
Open a terminal and enter the instructions to change the password.
650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M01/8E/93/wKiom1jGA8uQi5HlAAC9RARH5XY894.png-wh_500x0-wm_ 3-wmp_4-s_4280753950.png "title=" MYSQL2. PNG "alt=" Wkiom1jga8uqi5hlaac9rarh5xy894.png-wh_50 "/>
The Password=password (' Your new password ') is modified to complete.
This article is from the "Hand over Incense" blog, please be sure to keep this source http://19941018.blog.51cto.com/11889001/1905766
How to change the root password of MySQL in MySQL safe mode