MYSQL as a Unix Socket
How do I connect from php to mysql through a Unix socket not going into TCP/IP as they both on same server?
[107 byte] By [
walidaly] at [2007-11-20 11:16:01]

# 1 Re: MYSQL as a Unix Socket
A Unix socket is usually working with TCP/IP. TCP is a protocol. A socket is an ID for a connection.
In order to work on the same server, the local 127.0.0.0 address can be used, but I don't remember if there are other things to do. Maybe somebody else will give you a more complete answer, or the answer might be found somewhere on the site of MySQL.
# 2 Re: MYSQL as a Unix Socket
Thanks for the hint, I'm trying to connect with PHP5...any help is appreciated
# 3 Re: MYSQL as a Unix Socket
$mysqli = new mysqli("127.0.0.1", "username", "password", "database");
See http://php.net/mysqli_connect for further reference. If you do not have the mysqli module enabled, see http://php.net/mysql_connect . If you do not have either of those modules enabled, you should look into configuring your PHP configuration file to load one of them.
# 4 Re: MYSQL as a Unix Socket
Thanks for your reply
I guess it should be something like
mysql_connect('unix:///server/mysql.sock');
do I need to edit mysql config to disable the TCP/IP server or maybe a command line to launch mysql?