mysql_connect remote machine

From: Date: Tue, 28 Nov 2000 14:30:52 +0000
Subject: mysql_connect remote machine
Groups: php.general 
Request: Send a blank email to php-general+get-27597@lists.php.net to get a copy of this message
I'm trying to connect to a mysql server on a remote machine using PHP 3. (The application is talking back from a SSL site to the main site to pull data out of the main database). I've tried using the usual mysql(hostname,user,password) but this doens't work when using the full http address (error is: - "Warning: MySQL Connection Failed: Unknown MySQL Server Host 'http' (0) in /home/sites/site4/users/cumbrian/web/dbtest.php3 on line 3 Couldn't connect to server." - which I interpret as meaning that it doesn't like the colon in the address. If I use instead the unresolved IP address (eg111.111.111.111) then I get this error instead: - "Warning: MySQL Connection Failed: Access denied for user: 'x@y' (Using password: YES) in /home/sites/site4/users/cumbrian/web/dbtest.php3 on line 3 Couldn't connect to server." The problem here is that the domain of the ssl connection is always appended to the username, which prevents access to the MySQL server on the other machine. I've got round this by giving username@the.ssl.connection access to the server, but does anyone know of a neater way of doing this? Thanks Tom

« previous php.general (#27597) next »