Database configuration in CPanel

Dear Friend,
Two days before we migrated our hosting to CPanel hosting.
After uploading the contents and exporting the database, the site displayed “Database connection failed”
We enquired the hosting service providers and their reply is given below

we would like to Inform you that , we checked at our server end and your database is connecting fine with Localhost and as well as IP ( mysql -u username -hlocalhost -p ) ( mysql -u username -hxxx.yy.zzz.qqq -p ) and your database setting should be double code end with semicolon . kindly coordinate with your developer to check your database string . please contact to us for future assistance.

We could not able to understand the meaning of “double code end with semicolon”
Kindly suggest us how to configure database in config.php file

Hi @drvenkatesanj,

I’m afraid that “double code end with a semicolon” doesn’t make sense to me either. Does your username or password contain a " symbol or something?

The message means that MySQL didn’t accept the combination of username, password, and database name, so ensure that those are correct. If you have SSH access to your server, you can test them out using the command line given above.

Regards,
Alec Smecher
Public Knowledge Project Team

Actually the site vendor confused us with these words.
Finally it seems that we need to do what is suggested by ojs and real problem is in setting up the permission in cpanel.
Now it is running fine.
VJ.

Hi @drvenkatesanj,

Glad to hear you got this aspect working!

Regards,
Alec Smecher
Public Knowledge Project Team