Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Problem mysql_connect : Help ?
August 30, 2007, 9:51 am
rate this thread
Le 30 08 MMVII,
I have a problem using to connect to MYSQL from one server to another
In other words, On server A, I have my PHP files, and on server B, I
have MySQL installed.
Localhost is fine, but an I.P. as a host lead to an error : Warning:
mysql_connect(): Can't connect to MySQL server on '207
Here is what I got :
$dbtype = "mysql"; ##Defines Database type
$dbhost = "184.108.40.206:3306"; ##Your host
$dbuname = "maincontheaderbox"; ##Database Name
$dbpasswd = "bobyken"; ##Database Password
$dbase = "z_extras";
maincontheaderbox is the root user getting all previleges.
Comment : I mentioned PORT 3306. Not sure at all of that port (from
OVH french.hosting services)
I ensured that my.cnf does not forbid outside mysql connections.
$db_url = 'mysql://My_Account_Name(A)_username:password@localhost/
Many thanks for your help from your knowledge and experience.
- Captain Paralytic
August 30, 2007, 10:27 am