MySQL Forums
Forum List  »  PHP

Can't connect to local MySQL server through socket
Posted by: E Ad
Date: October 27, 2005 09:43PM

Hi,
I have installed LAMP with php5. I am using a socket for mysql wich is in different server grieg. My php and apache are in another server agogo.

# my.cnf file is

[mysqld]
datadir=/srvr/akande/database/mydata
socket=/srvr/akande/database/mysqlnew.sock
port=3306
set-variable = key_buffer_size=16M
set-variable = max_allowed_packet=1M
[mysql.server]
user=mysql
basedir=/srvr/akande/database/lib
[mysql]
socket=/srvr/akande/database/mysqlnew.sock
port=3306
[mysqldump]
quick


# in my conf file for php
./configure --prefix=/import/agogo/1/akande/apache2/php/ --with-apxs2=/import/agogo/1/akande/apache2/bin/apxs --with-mysql=/import/grieg/1/akande/database/bin--with-mysql-sock=/import/grieg/1/akande/database/mysqlnew.sock--enable-sockets

php with apache is working but for mysql I am getting following error message:

Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/import/grieg/1/akande/database/mysqlnew.sock' (111) in /export/agogo/1/akande/apache2/htdocs/SDC/indexdb.php on line 3
Could not connect: Can't connect to local MySQL server through socket '/import/grieg/1/akande/database/mysqlnew.sock' (111)


Can Please anybody help me?



Thanks,
E Ad

Options: ReplyQuote


Subject
Written By
Posted
Can't connect to local MySQL server through socket
October 27, 2005 09:43PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.