What if MySQL loses the root password? _ PHP Tutorial

Source: Internet
Author: User
What if MySQL loses the root password ?. Author: Wang Meng (HeartIcy@163.com) lost the password is very sad, especially the root password lost :(. I installed to play lost will be lost, but in case of production server hung Ma author: Wang Meng (HeartIcy@163.com)
It is very sad to lose the password, especially the root password :(. Self-installation
If the game is lost, it will be lost, but if it is a production server, it will be too much trouble!
It is assumed that the root password is lost due to intrusion. Here I will talk about myself
Views on such a problem.
First of all, there is no need to panic when we encounter such a problem. The whole recovery process is also very simple.
1. download the MySQL source code distribution package. you do not need to differentiate the operating system. what we need is
.
2. rename the mysql folder in the data directory of your mysql database to oldmysql.
3. copy the mysql directory under the data directory in the source code package to your mysql data directory.
.
4. restart mysql. the authorization relationships of mysql are the same as those of the newly installed mysql.
Login code, and then adjust the authorization.
5. open the database oldmysql and check for any problems.
6. if there is a backup, the integrity of the original database in the system will be checked to avoid repair.
Change.
Through the above six steps, you can completely restore your control over mysql, with the focus on
In the next two steps, check that the other party has modified those permissions and the data integrity check.


It is very sad to lose the password of the HeartIcy@163.com, especially the root password :(. I lost my own installation and play, but in case the production server crashes...

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.