Jump to content

Configuring Mysql Socket


Evank6

Recommended Posts

Hey, here is the error that i get whenever i try to call my mysql database in php:

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2) in /Library/WebServer/Documents/News/main.php on line 4[/quote]

the path to my mysql socket is /tmp/mysql.sock not /var/mysql/mysql.sock, i have configured php.ini to say mysql.default_socket = "/tmp/mysql.sock", but it is still trying to use the socket in '/var/mysql/mysql.sock', which doesnt exist.
[!--quoteo(post=352546:date=Mar 7 2006, 11:09 AM:name=Evank6)--][div class=\'quotetop\']QUOTE(Evank6 @ Mar 7 2006, 11:09 AM) [snapback]352546[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Hey, here is the error that i get whenever i try to call my mysql database in php:
the path to my mysql socket is /tmp/mysql.sock not /var/mysql/mysql.sock, i have configured php.ini to say mysql.default_socket = "/tmp/mysql.sock", but it is still trying to use the socket in '/var/mysql/mysql.sock', which doesnt exist.
[/quote]

Did you restart apache after updating php.ini?
not only did i restart apache, i restared the computer it was running on. why i want to edit a variable in php.ini, should i change it to:

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]mysql.default_socket = "/tmp/mysql.sock"[/quote]

or

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]mysql.default_socket = /tmp/mysql.sock[/quote]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.