A reckless behavior: the database cannot be operated after the MySQL root Password is changed in phpmyadmin, and phpmyadminmysql

Source: Internet
Author: User

A reckless behavior: the database cannot be operated after the MySQL root Password is changed in phpmyadmin, and phpmyadminmysql

I. Mobile Behavior)

The PHP environment is installed in xampp during a development. You need to use phpmyadmin to access MySQL during database operations, so you can directly set the password of the root user to "123456" in the user table of the mysql database, turn off the page, restart MySQL, and access MySQL again through phpmyadmin. You can guess what happened

After entering MySQL, the mysql database disappears and I do not have the permission to create a table. An error is returned when I run the use mysql Command (Access denied for user ''@ 'localhost' to database 'mysql '), as shown in

 

Ii. Try

Of course, the problem is solved. I can't help using databases, so I had to go online and some online solutions didn't solve my problem. What should I do ???

I tried various methods. The problem is still there, without increasing or decreasing!

Give up ??? Unwilling !!!

I don't know if it's a problem with phpmyadmin. So I restored all the changes and used MySQL-Front to log on as "root user name and blank password". the problem still exists, so I'm disappointed!

 

 

Iii. Hope

Now I suddenly thought that MySQL could be accessed through the "root user name and blank password" method. can I access MySQL through the xampp command window? I tried it and succeeded!

Then, use the SQL statement to change the password!

So far, the problem is solved. Why can't I access MySQL using phpmyadmin again ???

All the success ???

A flash of light may cause the C: \ xampp \ phpMyAdmin \ config. inc. php file to be modified. Add the new password as follows and access it again!

 

View the user table in the mysql database as follows:

 

Summary:

When you are not familiar with these tools, do not use them)

If necessary, you can take a brief look at the information.

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.