[kind of urgent] Customer Website down after changing SQL user password

Operating System & Version
Linux
cPanel & WHM Version
92.0 (build 10)

digitalpage

Registered
Feb 18, 2021
2
0
1
Australia
cPanel Access Level
Website Owner
Hi,

I am transferring a customers email and web hosting from one cpanel to another cpanel.

When transferring the sql database, I was unsure of the of the sql user password, so I reset the password.

Now the website gets this issue:

Error connecting to the database server
  • The database server to which our website connects to appears to be having a bit of a problem at the moment. This is a temporary issue and we hope that our service provider will get the server back up and running soon. Meanwhile, please bookmark (hit Ctrl D) our page and return in approximately 30 mins

I was unsure that would cause an error as I thought it would just automatically update with the new credentials.

How do I fix this? Kinda freaking out.

Thank you
 

Attachments

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
7,494
1,009
313
cPanel Access Level
Root Administrator
Hey there! You did everything correctly on the database side of things, but the site code will have a database connection string that needs to be updated as well. For example, a WordPress site has this entry in the wp-config.php:

Code:
/** The name of the database for WordPress */
define('DB_NAME', 'username_wp1');

/** MySQL database username */
define('DB_USER', 'username_wp1');

/** MySQL database password */
define('DB_PASSWORD', 'yourdatabaseuserpassword');

/** MySQL hostname */
define('DB_HOST', 'localhost');
You'd need to find that connection string for your website and update the password there, and then I would expect things to work well.
 

digitalpage

Registered
Feb 18, 2021
2
0
1
Australia
cPanel Access Level
Website Owner
Hey there! You did everything correctly on the database side of things, but the site code will have a database connection string that needs to be updated as well. For example, a WordPress site has this entry in the wp-config.php:

Code:
/** The name of the database for WordPress */
define('DB_NAME', 'username_wp1');

/** MySQL database username */
define('DB_USER', 'username_wp1');

/** MySQL database password */
define('DB_PASSWORD', 'yourdatabaseuserpassword');

/** MySQL hostname */
define('DB_HOST', 'localhost');
You'd need to find that connection string for your website and update the password there, and then I would expect things to work well.
Thanks so much for your reply, that ended up being the issue. I sorted that out with the hosting companies support team.

I'm not a professional domain/hosting guy, am a telecommunications and internet guy who took on one of my customers domain and web hosting as a little learning experience as they were unhappy with their current provider. Definitely wont be making this mistake again haha! Learnt my lesson.