On my latest machine, Lenovo yoga2 running Ubuntu I install xampp as usual.
It started just fine, no error messages however:
The mysqld socket file: "/opt/lampp/var/mysql/mysql.sock" was absent and sql_connect() in PHP would fail with:
Warning: mysql_connect() [function.mysql-connect]: No such file or directory
The problems was the mysqld was installed and started by something else. It appeared to be python used by terminator but I didn't go into too much detail.
The image running was /usr/sbin/mysqld instead of /opt/lampp/sbin/mysqld
kill and "sudo kill -9" did not take down the mysqld process which just kept restarting. The solution is to properly stop the rogue mysqld daemon before starting xampp. I read so much misinformation trying to find a solution I decided to make this public service announcement!
sudo service mysql stop
sudo /opt/lampp/lampp start