1
votes

I just setup Ubuntu KDE on my chromebook and installed XAMPP, as I started the service using this command sudo /opt/lampp/lampp start

I receive

XAMPP: Starting Apache...ok XAMPP: Staring MySQL...ok XAMPP: Starting proFTPD...ok

However when I access localhost/phpmyadmin it started by giving me this error: #2002 - No such file or directory. After googling around a bit I changed the host in config.default.php (which is in /opt/lampp/phpmyadmin/libraries) from localhost to 127.0.0.1, opening the same page again gave me a different error #2002 - Connection refused.

I then googled again and changed config.inc.php (which is in /opt/lampp/phpmyadmin) and added in the password and refreshed but that did not work. I also changed the user in the same file from 'root' to my username but that did not work.

lastly I searched for the file 'mysql.socket' and that I found in '/tmp/akonadi-naguib.JHQlko/mysql.socket' and I have edited the pdo_mysql.default_socket in the file php.ini which is in /opt/lampp/etc.

How do I solve this issue?

1

1 Answers

2
votes

Apparently what I did wrong was giving my user access to the /opt folder which contains mysql without knowing that I am preventing the access from the root, and mysql needs root access.

If you're facing the same issue try this:

sudo chmod 755 /opt/lampp/etc/my.cnf      
sudo chmod -R 777 /opt/lampp/var/mysql
sudo chown -hR root/opt/lampp