Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mysql.sock prob

Status
Not open for further replies.

piti

Technical User
Apr 12, 2001
627
SK
hi
previously i had mysql installed from rpm, now i installed mysql (ver 3.23.49a) from the binary package
i was able to start the server, but not connect to it other then from the console, a test php script returned "Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)", so I changed the /usr/local/mysql/bin/safe_mysqld script on the MYSQL_UNIX_PORT line to "MYSQL_UNIX_PORT=${MYSQL_UNIX_PORT:-/var/lib/mysql/mysql.sock}", then I was able to connect to my new server, but all the other bins from the mysql package are connecting to mysql through /tmp/mysql.sock, which in fact is not existing, is the only way how to solve it to create the /etc/my.cnf file and add there:
[client]
socket = /var/lib/mysql/mysql.sock
[mysqld]
socket = /var/lib/mysql/mysql.sock

is there anywhere stored what socket is used to connect to mysql, as the php was somehow setup for connecting to the /var/lib/mysql/mysql.sock, and how to change it (other than in the safe_mysqld script and my.cnf file)?
thanx
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top