Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Having trouble with mysql_connect

Discussion in 'Database Discussion' started by pjcollis, May 7, 2014.

  1. pjcollis

    pjcollis Registered

    Joined:
    May 6, 2014
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hi everyone,

    I have just transferred my website - Removed - is a new host company - Removed -, loaded the MySQL database via phpMyadmin and have ftp'ed the .php and .js files to the server.

    I have amended the $dbhost, $dbuser and $dbpass values but can't get the format right. I think it should be something like :

    'mysql1.<domain-name>:<port>'

    My old string used to be 'mysql1.domain.com:3306'

    Any suggestions will be gartefully received.


    Regards,

    Pete Collis
     
    #1 pjcollis, May 7, 2014
    Last edited by a moderator: May 7, 2014
  2. cPanelPeter

    cPanelPeter Technical Analyst III
    Staff Member

    Joined:
    Sep 23, 2013
    Messages:
    575
    Likes Received:
    20
    Trophy Points:
    93
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Are you sure it was mysql1 and not mysqli ? Is MySQLi installed on the new host? Since you're access level is listed as Website Owner, you should ask your new host what error messages appear in /usr/local/apache/logs/error_log
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,704
    Likes Received:
    1,883
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello :)

    Also, make sure you use "localhost" as the MySQL hostname unless you are using a remote MySQL server.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice