DB connection error while testing my website.

lisafranklin

Registered
May 23, 2014
2
0
1
cPanel Access Level
Website Owner
I get this DB connection error while testing my website. Please assist me how to resolve this issue. I am not happy with their cPanel, It's not at all user friendly. Tell me the process in detail of How to take backup of database of my website so i can take backup before transferring.

Here's the db connection error -

appINIT.php configuration settings

<?php
$db_host = "localhost";
$db_port = "80";
$db_user = "cPanelUsername_databaseUsername";
$db_password = "xxxxxxx";
$db_name = "cPanelUsername_databaseName";
define("EXT", '.php');
$licensekey = ""; #License Key
$secret = "yyyy"; #Secuirity Salt

?>
//prepared statement
$stmt = $dbh->prepare("select * from appconfig"); $stmt->execute(); $result = $stmt->fetchAll();
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,205
363
Hello :)

1. Did you browse to "MySQL Databases" in cPanel and ensure the database user was added to the database?

2. You can use the "Backup Wizard" option in cPanel to backup your account.

Thank you.
 

lisafranklin

Registered
May 23, 2014
2
0
1
cPanel Access Level
Website Owner
Yes finally I have shifted to waxspace shared web hosting plan ,from their customer support helped me to solve this major issue.

And cPanelMichael .. thank you for your help it did helped me. :)