After resetting your database password in the virtual host management console, your Web Hosting website may become inaccessible. This issue occurs if the new password is not also updated in your website's database connection configuration file. Follow the steps in this topic to resolve the problem.
Symptoms
After resetting the database password in the virtual host management console, your website may become inaccessible and display a database connection error.
Cause
Resetting the database password in the virtual host management console does not automatically update the password in your website's database connection configuration file. You must manually update the configuration file with the new password.
Solution
Use an FTP client to download your website's files to your on-premises host.
In this example, the website's files are stored in the E:\www directory on the on-premises host.
Open Command Prompt on your on-premises host.
Press the Win+R keys.
In the Run dialog box, enter
cmdin the Open field.Click OK.
Run the following command to switch to the root directory E:\.
e:Run the following command to switch to the E:\www directory.
cd wwwRun the following command to find the database connection configuration file.
findstr /s /i "your_database_name" *.*In this example, the command output identifies common.inc.php as the database connection configuration file:
C:\Users\Administrator>e: E:\>cd www E:\www>findstr /s /i "xxx_db" *.* data\common.inc.php:$cfg_dbname = 'xxx_db'; E:\www>Change the database password in the configuration file to match the new password from the virtual host management console, then save the file.
You can use a text editor such as EditPlus to open the database connection configuration file (
common.inc.php).Upload the modified database connection configuration file to your website's root directory.
For more information, see Upload website files to a Linux-based virtual host or Upload website files to a Windows-based virtual host.
Access your website again.
If your website loads as expected, the issue is resolved.
If the website is still inaccessible, submit a ticket for assistance.