Can't connect to server through socket '/tmp/mysql.sock'
-
- Posts: 4
- Joined: Fri Sep 12, 2008 9:26 am
Can't connect to server through socket '/tmp/mysql.sock'
I have MySQL running with a number of databases (including that of the Seagull PHP-Framework as well as "private" ones). Now, trying to install Serendipity on top of that I get the above message. I have got "/var/lib/mysql/mysql.sock"specified in my.cnf and that works fine with the existing DBs. Any ideas?
-
- Posts: 4
- Joined: Fri Sep 12, 2008 9:26 am
Can't connect to server through socket '/tmp/mysql.sock'
To clarify further: /var/lib/mysql/mysql.sock is specified for both [mysqld] daemon AND [client]. And, as I mentioned in the original post, this works just fine for all the other clients (eg. OpenOffice Base as well as the Seagull-PHP-Framework). Any help is appreciated.
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Can't connect to server through socket '/tmp/mysql.sock'
Hi!
I don't know how seagull works, maybe it uses the PHP commandline client or a different MySQL Library (PDO?). s9y uses mysql(i) extensions, which can have compile-time settings for the PHP module that specify a different socket.
The setting in your my.cnf is unrelated to that, the socket is specified through php.ini usually.
You could try to access the host via IP, by using the IP instead of "localhost".
HTH,
Garvin
I don't know how seagull works, maybe it uses the PHP commandline client or a different MySQL Library (PDO?). s9y uses mysql(i) extensions, which can have compile-time settings for the PHP module that specify a different socket.
The setting in your my.cnf is unrelated to that, the socket is specified through php.ini usually.
You could try to access the host via IP, by using the IP instead of "localhost".
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
- Posts: 4
- Joined: Fri Sep 12, 2008 9:26 am
Can't connect to database
Hello Garvin,
Many thanks for your advice. I put /var/lib/mysql/mysql.sock into my php.ini. That did not cure the problem. Then I tried your second advice - I specified 127.0.0.1 instead of "localhost" when installing serendipity - and that did the trick. I want to test serendipity within the Seagull OO-PHP-framework as an internal discussion forum for my brassband. I am trying to create a kind of "virtual office" for it, besides the usually publicity-oriented web portals in this scene.
Regards and greetings from Salzburg
Many thanks for your advice. I put /var/lib/mysql/mysql.sock into my php.ini. That did not cure the problem. Then I tried your second advice - I specified 127.0.0.1 instead of "localhost" when installing serendipity - and that did the trick. I want to test serendipity within the Seagull OO-PHP-framework as an internal discussion forum for my brassband. I am trying to create a kind of "virtual office" for it, besides the usually publicity-oriented web portals in this scene.
Regards and greetings from Salzburg
-
- Regular
- Posts: 9
- Joined: Sat Sep 06, 2008 3:55 am
-
- Posts: 4
- Joined: Fri Sep 12, 2008 9:26 am
Can't connect to host
the following entries in connection with localhost are in /etc/hosts:
127.0.0.1 localhost
# special IPv6 addresses
::1 localhost ipv6-localhost ipv6-loopback
I also use localhost:8080 for local testing of a website which I am setting up at the moment. And that works just fine.
127.0.0.1 localhost
# special IPv6 addresses
::1 localhost ipv6-localhost ipv6-loopback
I also use localhost:8080 for local testing of a website which I am setting up at the moment. And that works just fine.