XAMPP mysql.sock is missing

Jacob Krieg picture Jacob Krieg · Apr 26, 2012 · Viewed 19.3k times · Source

I installed XAMPP from the apachefriends.org following these instructions: http://www.apachefriends.org/en/xampp-linux.html#377 .

The problem is that file /opt/lampp/var/mysql/mysql.sock is missing. How can i get this file? Thing is I want to run an easy MySQL command learning tool and I get this error that the file is missing. (Warning: PDO::__construct() [pdo.--construct]: [2002] No such file or directory (trying to connect via unix:///opt/lampp/var/mysql/mysql.sock) in /opt/lampp/htdocs/SID/sid.php on line 188)

XAMPP is running ok, I started it with sudo /opt/lampp/lampp start. http://localhost/ works fine. I checked /opt/lampp/etc/my.cnf and it's ok, it contains this data http://pastebin.me/8d6b367a7ee76be70f944d9b960bb8f0

Please help, how can I get that mysql.sock?

Thanks

Answer

Pedro picture Pedro · Dec 2, 2012

execute the next command in a Terminal windows:

ps -ax|grep mysql

And you can see a result like this:

--socket=/Applications/XAMPP/xamppfiles/var/mysql/mysql.sock --port=3306

Bes Regards

PS: I use MAC OS X