I've made a mess on my server. I'm using LAMPP and I've created a new user apache:apache and assigned him to take care of the Apache. phpMyAdmin did not work due to that change so I had to chown the phpmyadmin/config.inc.php to apache:apache. That worked but then I made the most stupidest thing, I chowned the whole /opt/lampp dir to apache:apache. I've installed the LAMPP inside a VM to copy all the file and dir permissions. Now I have the mysql.sock issue. It DOES exist but it won't connect.
raski@xxxxxx:~$ sudo cat /opt/lampp/etc/my.cnf |grep socket
socket = /opt/lampp/var/mysql/mysql.sock
raski@xxxxxx:~$ sudo cat /opt/lampp/etc/php.ini |grep mysql.default_socket
mysql.default_socket = /opt/lampp/var/mysql/mysql.sock
raski@xxxxxx:~$ ls -ld /opt/lampp/var/mysql/mysql.sock
srwxrwxrwx 1 mysql wheel 0 2011-07-15 12:09 /opt/lampp/var/mysql/mysql.sock
raski@xxxxxx:~$ mysql -u root -p
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/lampp/var/mysql/mysql.sock' (111)
I'd paste 'ls -lR /opt/lampp/var/mysql/' but that would be too much ;) All dbases are set to mysql:mysql which I created. I don't know who was the owner of the files before and which group they belonged to. I googled and saw everywhere mysql:mysql so I created it.
Any suggestions? Thx in advance!