How to change the root password of MySQL in MySQL safe mode

Source: Internet
Author: User
Tags mysql in

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.