Having trouble with mysql_connect

pjcollis

Registered
May 6, 2014
1
0
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
 
Last edited by a moderator:

cPanelPeter

Senior Technical Analyst
Staff member
Sep 23, 2013
586
25
153
cPanel Access Level
Root Administrator
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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello :)

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

Thank you.