XAMPP mysql.sock is missing
Asked Answered
L

3

5

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

Liverwurst answered 25/4, 2012 at 23:1 Comment(5)
You may first make sure that mysql server is started as this required file is a socket.Theoretics
as recommendation: dont use xampp on linux, its ok for windows because setting everything up from hand is horrible but on linux its just a performance loss. just install php5, php5-mysql, apache2 and mysql-server and ur done. if you use xampp you wont get any updates and ur server is vulnerable, if you install it from the repos ur mostly not vulnerable.Empathy
Thank you for your response. I saw other posts on the internet regarding this issue and no solution. I'm afraid you're rightLiverwurst
K1773R Could not agree more.. Nothing but problems with xampp on linux. Setup is much easier without xampp on linux. Ubuntu 16.10 here.Clergy
i went for xampp because i kept having problems with my own installations of php and mysql. i am still battling this issue of missing socket file and im on macosPhylys
F
13

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

Freely answered 2/12, 2012 at 15:38 Comment(1)
i dont see this result i only see : 27313 ttys003 0:00.01 grep mysqlPhylys
A
2

I think you are running other instance of mysql..

try this :

/opt/lampp/bin/mysql -u *user* -p

and then enter your password when asked for.. Hope this helps..

I had a similar case, when putting only mysql, because that way it wasnt called lampp stack mysql but /usr/bin/mysql (which you can find typing --> which mysql)

Azure answered 1/7, 2012 at 0:0 Comment(0)
V
2

in ubuntu

/opt/lampp/var/mysql/mysql.sock

Varityper answered 28/5, 2018 at 21:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.