Phpmyadmin: how to change the Root password and cannot log on _ PHP Tutorial

Source: Internet
Author: User
Phpmyadmin: the Root password cannot be logged on. In the past, AMPServ was used for testing and the default empty password root account was used directly. The password cannot be blank in the environment to be installed today. Instead, add a password to the root user. However, it was found that most of the courses on the Internet that used to use AMPServ for testing are directly using the default empty password root account. The password cannot be blank in the environment to be installed today. Instead, add a password to the root user. But I found that most of the tutorials on the Internet only talk about how to modify them. But there are few details. It took more than half an hour to find a solution. Write it here to avoid forgetting it again. There is only one method: phpmyadmin

Log on to phpmyadmin with the root account, click mysql 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 ('000000') where User = 'root'

Among them, 123456 is the password you want to change. remember not to manually change the password in the database.

Modify the root password of a mysql database

Click "execute" in the lower-right corner. the following page is displayed, indicating that the modification is successful.

Phpmyadmin successfully changed the mysql database root password.

Never go away. it's not over yet. Go to the libraries directory under phpmyadmin and modify the config. default. php file. Find $ cfg ['servers'] [$ I] ['password'] = '',

Change to $ cfg ['servers'] [$ I] ['password'] = '000000'; 123456 is the password you want. Try logging in now.

Bytes. The password cannot be blank in the environment to be installed today. Instead, add a password to the root user. But found that most of the online teaching...

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.