I am using PHP version 4.3.7 paired with MySQL 4.0.18 on a Unix/Apache database.
I will be trying to connect to the database from another server. I think I'm having trouble with the mysql_connect syntax, but I'm not totally sure.
I have already configured the mysql database to accept remote access from the other server. (hopefully). But, just to make sure I do everything right, I tested this script on my own server, using the server name instead of "localhost." I figured the remote db language should THEORETICALLY work (even if I leave it on the same server) if I have the syntax right. (I hope this is clear.)
So, let's say I'm using the script:
$link = mysql_connect("localhost", "username", "password")
or die("Could not connect : " . mysql_error());
mysql_select_db("database") or die("Could not select database");
How would I replace "localhost"? My host company said I would want to use strunkwriter.com as the db host address, but simply replacing "localhost" with "strunkwiter.com" doesn't work. I tried "mysql.strunkwriter.com" and "mysql.www.strunkwriter.com" and "http://www.strunkwriter.com".
I am out of ideas and any suggestion would be welcome. Thanks in advance.