Forgot MySQL password under centos6.5

Source: Internet
Author: User

1, this way will make the server in an insecure situation, please try to ensure that in a safe environment, because, this way, will allow anyone to arbitrarily connect MySQL database.

2, #vim/etc/my.cnf

In the section "Mysqld", add skip-grant-tables

Save and exit.

3. Restart Mysqld

#service mysqld Restart

Will prompt stopping mysql:[OK]

Starting mysql:[OK]

4. Log in and modify the root password of MySQL

#mysql

Mysql>use MySQL

Mysql>updateuser Set Password = password (' Your password ') where user = ' root ';

Prompt for query OK, 3 rows Affected (0.00 sec)

Rows Matched:3 Changed:3 warnings:0

5, successful, password reset success.

6, this article according to

Http://www.cnblogs.com/sbaicl/articles/3132010.html

After the success of the practice, it is not the original, but a word a loadline out.

Hundred Cattle Information Technology Bainiu.ltd organized and published in the blog Park

Forgot MySQL password under centos6.5

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.