this problem has plagued me for a long time and every time I think I got it under control it goes wacky again,
/var/mysql/mysql.sock or /tmp/mysql.sock (which is it ?)
I've read so many web pages on the subject and they all seem to conflict with each other
some say put /tmp/mysql.sock in the php.ini while others say /var/mysql/mysql.sock
I had this working until i restarted the Mac, now no mysql.sock seems to exist at either locations.
My current setup when it was working
php.ini (nothing)
my.conf i have this
[mysqld]
socket = /var/mysql/mysql.sock
[client]
socket = /var/mysql/mysql.sock
I tried it with /tmp/mysql.sock and that didn't work either
the mysql startup sys preference pane is not working
can someone please set me straight on this ?
i'm using Mac OSX 10.4.11
You can store the socket anywhere you want, as long as mysql has permission to make and access the file. There is no magic location for it. I typically store them in the data directory of mysql, while others put them in /tmp, and others like yours in /var/mysql.
You mention you can't connect to mysql. Do you mean that mysql won't start, or you can't connect with the client?
I highly recommend using MAMP.
http://www.macupdate.com/info.php/id/16197
It provides a complete web development platform with apache server, with configuration of PHP and various apache mod settings, along wtih phpmysql for DB access via a web gui, and is pretty slick. It also seems to take out any issues with mysql since it runs it's own installation of it.
Scott
mysql won't start, tried it in terminal and also using the preference pane all because of the socket, the file no longer exists not sure how it creates it,i had everything working before I rebooted the mac.
I used MAMP before and didn't care for it, all the urls have to be :8888 and the files usually have to be in application folder, i have my files on another partitioned HD and my non-apple standard apps are also in another folder for backup purposes, virtual hosts are also a pain with mamp.
I really want to continue using Mac php/mysql after all its what the mac is designed for, we should make good use of it.