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.

Sub Domain Wont Connect to MYSQL?

Discussion in 'Database Discussions' started by AJW-FLEAF, Oct 17, 2013.

  1. AJW-FLEAF

    AJW-FLEAF Registered

    Joined:
    Oct 17, 2013
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Reseller Owner
    HI,

    We not long ago moved to a new VPS.

    We have just copied a clients live Joomla site files over to a new subdomain. And created a new database and copied the data & structure over also. This will be used for development testing of new features before we roll them out to the live site.

    However for some reason the sub domain will not connect to the MYSQL database (the copy or the live one)

    All the details in the Joomla config are correct (DB name & User with the cpanel user prefix & the password, and the the user is added to that database, and host is localhost)

    We have done this many times before, but not on the new VPS.

    Is there something we are missing?

    Cpanel & WHM Version 11.38.2 (build 7)

    Any help appreciated.
     
  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
  3. AJW-FLEAF

    AJW-FLEAF Registered

    Joined:
    Oct 17, 2013
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Reseller Owner
    HI,

    Sorry should have included this;

    Database connection error (2): Could not connect to MySQL.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Check to ensure that MySQL is running well on your system. If it is, try creating the database user again with the same password used in the script configuration file, and then ensure you add that database user to the database. Also, check the /usr/local/lib/php.ini file to make sure the "sql.safe_mode" option is disabled.

    Thank you.
     
  5. AJW-FLEAF

    AJW-FLEAF Registered

    Joined:
    Oct 17, 2013
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Reseller Owner
    HI,

    Thanks for your advice and time.

    We have created the user and DB and added the user again but to no avail. The odd things is even using the original live database and user which we copied from (which we know works fine as its a live site) the subdomain still will not connect to the same database.

    Safe mode is off, and SQL seems to be running ok.

    This isnt an issue we have encountered before and we have used WHM / Cpanel & Opensource CMS systems for
    some years now.

    Normally its a simple typo or error in the joomla config file that presents this error but not in this case.

    Any other ideas? :)
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Feel free to open a support ticket so we can take a closer look:

    Submit A Ticket

    You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
Loading...
Similar Threads - Sub Domain Wont
  1. ocraft
    Replies:
    1
    Views:
    180

Share This Page