October 4th, 2000, 06:40 PM
Hello again, I am having trouble connecting to a mySQL server that resides on another machine. Can someone provide me with some code that works for PHP 3/4 to connect to a server other than 'localhost'?
October 4th, 2000, 07:03 PM
Instead of localhost, you can also type the ip or url of the remote server...
At least, that works with me..
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>
mysql_connect( www.myserver.com, user, passwd );
The user(name) you use has to have access to the server from a not-localhost location. If the code above doesn't work, this could be the problem. If you have access to the remote server you can change the mysql settings... (read the mysql-manual on how to do this: something with access privileges or something I think)