|
Posted by Steve on 02/24/06 00:00
> $conn = mysql_connect($mysql_host, $username, $password, true);
> Where
> $mysql_host = another server (db.example.com)
> $username = the username in the mysql database
> $password = the password of the the user above
> This all works if I use the command line mysql command with the -h
> command for specifying a host. It's just through php that I get the
> /tmp/mysql.sock does not exist error. I'm just confused why php would
> require the socket if it's not connecting to mysql locally. Does PHP
> require that the localhost have a mysql server installed even if I'm
> connecting to a remote server?
I don't suppose you could post the actual text of the error message,
too.
In the meantime you could try using the IP address instead of the host
name, in case DNS lookups are failing for some reason.
---
Steve
Navigation:
[Reply to this message]
|