2

When I start XAMPP it shows this

Starting XAMPP for Linux 7.0.8-0...
XAMPP: Starting Apache...ok.
XAMPP: Starting MySQL...already running.
XAMPP: Starting ProFTPD...ok.

when i open localhost/phpmyadmin it shows this error:

phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.

ps : it just was working fine , i just restarted my laptop then this

I tried to to stop any other mysql server but ...

/etc/init.d/mysql stop
bash: /etc/init.d/mysql: No such file or directory

service mysql stop
Failed to stop mysql.service: Unit mysql.service not loaded.

killall -KILL mysql mysqld_safe mysqld
mysql: no process found
mysqld_safe: no process found
mysqld: no process found
0

I think I had the same issue and I solved it this way.

There is a Your_username.pid file and Your_username.err file in /opt/lampp/var/mysql/. Delete them and restart Xampp.

It happens when you turn off your computer unsuccessfully or with an issue.

| improve this answer | |
0

I had same issue, removed these files and problem solved.

irdev@ubuntu:~$ sudo rm /opt/lampp/var/mysql/ubuntu.pid
irdev@ubuntu:~$ sudo rm /opt/lampp/var/mysql/ubuntu.err
irdev@ubuntu:~$ sudo rm /opt/lampp/var/mysql/ubuntu.log
| improve this answer | |
  • 2
    Blindly removing a PID file is not an good idea. Two instances of the same software can wreak havoc in a few cases - there's a reason locking is used. Do a cat /opt/lampp/var/mysql/ubuntu.pid, and check that the PID is not running before removing. If it's running, use kill to stop it. – vidarlo Oct 30 '17 at 6:00
  • @vidarlo Yes. I agree. In my case, I tried most ways to terminate MySQL but problem not solved. Its clear that above solution is not a best solution but it can be the last. – Reza Ramezanpour Oct 30 '17 at 9:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.