Home  >  Article  >  Backend Development  >  Solution to Phpmyadmin unable to log in after changing Root password_PHP Tutorial

Solution to Phpmyadmin unable to log in after changing Root password_PHP Tutorial

WBOY
WBOYOriginal
2016-07-21 14:54:231246browse

In the past, when using AMPServ for testing, the default empty password root account was used directly. The environment I want to install today does not allow the password to be empty, so I have no choice but to add a password for root. But I found that most of the tutorials on the Internet only talked about how to modify it. But few are introduced in detail. It took more than half an hour to find a way. I’m writing this here so I don’t forget it next time. There is only one way: phpmyadmin

First log in to phpmyadmin with the root account, then click on the left to enter the mysql database, and click "mysql" on the top to enter the sql input interface. Enter the following command:

Update user set password=password(‘123456′) where User=’root’

Where 123456 is the password you want to change. Remember not to manually change the password directly in the database.

Solution to Phpmyadmin unable to log in after changing Root password_PHP Tutorial

Modify mysql database root password

Then click "Execute" in the lower right corner. When you see the following interface, it means the modification is successful.

Solution to Phpmyadmin unable to log in after changing Root password_PHP Tutorial

 phpmyadmin successfully changed the mysql database root password.

Don’t walk away, it’s not over yet. Then you need to enter the libraries directory under the phpmyadmin directory and modify the config.default.php file. Find $cfg['Servers'][$i]['password'] = ‘ ‘,

Change to $cfg['Servers'][$i]['password'] = ‘123456′; 123456 is the password you want. Log in now and try it out.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/364617.htmlTechArticleIn the past, when using AMPServ for testing, the default empty password root account was used directly. The environment I want to install today does not allow the password to be empty, so I have no choice but to add a password for root. But I found that most of the online teaching...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn