The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

DB connection error while testing my website.

Discussion in 'General Discussion' started by lisafranklin, May 23, 2014.

  1. lisafranklin

    lisafranklin Registered

    Joined:
    May 23, 2014
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    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();
     
    #1 lisafranklin, May 23, 2014
    Last edited by a moderator: May 23, 2014
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  3. lisafranklin

    lisafranklin Registered

    Joined:
    May 23, 2014
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    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. :)
     
Loading...

Share This Page