Focus on cloud service provider activities
Notes on website operation and maintenance

Solve the problem that the AMH panel cannot connect because of changing the MYSQL database password

Lao Zuo has not paid attention to the information on the AMH panel for a long time, because the later version 5.0 is a paid version. First, I have no purchase experience, second, the official will provide solutions to problems, and third, the free version 4.2 can basically meet the basic needs of building a website. Today, a netizen came to me and said that when he changed the website database password in the PHPMYADMIN panel, he chose the wrong data table and directly changed the password of the ROOT user, who is the database linked to the AMH panel.

If this password error will cause us to open the panel with "[Amysql Notice] Access denied for user 'root' @ 'localhost' (using password: YES) MySQL link error, please configure the/Amysql/config.php file." The problem should be solved. This friend is also very interesting. I asked him to provide the ROOT information, and I logged in to solve it. But he asked me to describe it to him. Because I had never encountered such a problem, and there was no AMH panel environment in my hand, I had to open another test machine, and then install an AMH panel, Of course, it's boring to change the ROOT password, which leads to the same error as him, and then solve it for yourself.

Before solving this problem, some users may also need this process, because the MYSQL database password we set when installing the AMH panel may be too simple. We also want to reset the database password of a more complex AMH panel. Let's change the password first.

First, modify the password of the ROOT user database on the AMH panel

We can directly use commands to solve the problem. If it is troublesome or unfamiliar, log in to the AMH panel to download the PHPMYADMIN component, and then log in directly with the database panel after installation.

 Modify the password of the ROOT user database of the AMH panel

We can see the figure above, find the ROOT user we need to modify, and then edit it. Today, this friend didn't want to modify this user's information. He wanted to modify a website database, which led to a mistake.

 Modify MYSQL password

Here we can generate a complex password, or we can set one ourselves and execute it. In fact, when we open the front page of the panel, we can see the error, because we still have a configuration file that has not been modified.

Second, modify the AMH panel database configuration file

At the error prompt, we can see that the "Amysql/config. php" configuration file needs to be modified. At AMH5.0, we can see that the official solution is provided. After all, people pay for it. AMH4.2 does not tell where the path is (we do not spend money), so Lao Zuo searches with the find command to see where the file exists in the server. Then find several files with the same name.

AHM5.0 - /usr/local/amh-5.0/web/Amysql/

AMH4.2 - /home/wwwroot/index/web/Amysql/

We need to edit the fields in the config.php file.

 AMH Modify Database Configuration File

See the figure above, find the location of the password field, and then modify and replace it. If we open the home page of the AMH panel again, there will be no such problem.

To sum up, this method can solve the problem of changing the database password of the AMH panel. It is not simply changing the ROOT user password, but also modifying the configuration file, just like the database link file on our website.

Domain name host preferential information push QQ group: six hundred and twenty-seven million seven hundred and seventy-five thousand four hundred and seventy-seven Get preferential promotion from merchants.
Like( zero )
Do not reprint without permission: Lao Zuo's Notes » Solve the problem that the AMH panel cannot connect because of changing the MYSQL database password


Scan the code to follow the official account

Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge