Abnet Hussien
Abnet Hussien

Reputation: 163

I am facing a MySQL error when I start my Xampp in Ubuntu 18.04

My xampp in ubuntu was working just fine until suddenly it stopped working and when I reinstall it and start it through the command line, it is showing me this error "opt/lampp/bin/mysql.server: 260: kill: No such process" after starting.

I am also facing this error on my localhost/phpmyadmin

MySQL said: Documentation
Cannot connect: invalid settings.
mysqli_real_connect(): (HY000/2002): No such file or directory
Connection for controluser as defined in your configuration failed.
mysqli_real_connect(): (HY000/2002): No such file or directory
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.

Upvotes: 5

Views: 36722

Answers (9)

Nik
Nik

Reputation: 55

Apparently it was docker for me which was making this issue. So look for any docker container running on your system and run docker-compose down

Then restarting your xampp would resolve the issue

Note: Your docker container's behaviour depends on how you are defining 'restart' in your docker-compose.yml file. So keeping restart: unless-stopped will always start mysql service, even if you are restarting your system

Upvotes: 0

Engr Furqan
Engr Furqan

Reputation: 1

i think you are running both nginx and xmap on same Port. I found the Solution stopped thr nginx first then it wil work

Upvotes: 0

Marvin Dawson
Marvin Dawson

Reputation: 69

I was able to resolve my issue when I found out that the service "mysqld" was running in parallel on port 3306.

I was able to find this information out by running "netstat -tulpn | grep 3306" in the terminal, which showed that "mysqld" was running.

I then ran "sudo service mysqld stop" and restarted the MySQL server on the XAMPP and it worked.

Upvotes: 1

Nayana Chandran
Nayana Chandran

Reputation: 1483

My Mysql server faced the same issue. opt/lampp/bin/mysql.server: 264: kill: No such process error. And I followed below steps and fixed my issue.

  1. check if the MySQL service status.

    mysql service status

  2. stop the service using the command service MySQL stop. you will be prompted to provide your password, just do it.

    service mysql stop

  3. Now all you need to do is start xampp normally using sudo /opt/lampp/lampp start

    sudo /opt/lampp/lampp start

Upvotes: 1

tingwai
tingwai

Reputation: 81

The error is most likely permission issue, there is no error log from mysql, even though sudo chmod -R /opt/lampp worked but I don't think making /opt/lampp/ 777 is a good idea, so I made some improvements to the original answer:

  1. sudo chmod 777 /opt/lampp/var/
  2. sudo chown -R mysql:mysql /opt/lampp/var/mysql/
  3. sudo lampp restart

Upvotes: 8

nas
nas

Reputation: 1

You can try this steps all over since you use ubuntu; Download the installation package The first step is to download the XAMPP package for Linux from the official Apache Friends website:

cd /home/[username]/Downloads
chmod 755 xampp-linux-x64-7.2.10-0-installer.run
ls -l xampp-linux-x64-7.2.10-0-installer.run
sudo ./xampp-linux-7.2.10-0-installer.run`

then you continue with the set up.

Upvotes: -1

Sonali dhobale
Sonali dhobale

Reputation: 1

I fixed by (ERROR : opt/lampp/bin/mysql.server: 260: kill: No such process)

sudo chmod -R 777 /opt/lampp
sudo service mysql stop
sudo /opt/lampp/lampp restart

Upvotes: -2

Niyaz
Niyaz

Reputation: 927

I fixed by :

sudo service mysql stop sudo /opt/lampp/lampp restart

Upvotes: 10

I have seen same problem. Firstly i used these commands:

sudo chmod -R 777 /opt/lampp
sudo chown -hR nobody /opt/lampp
sudo chmod -R 755 /opt/lampp

Then;

sudo service mysql stop

So, you should restart the lampp:

sudo /opt/lampp/lampp restart

Check these; if your output

/opt/lampp/bin/mysqld_safe_helper: Can't create/write to file '/opt/lampp/var/mysql/MyName.err' (Errcode: 13 "Permission denied")

Then resolution is here: link 1

if output is:

XAMPP: Another web server daemon is already running

resolution: link 2

if output is:

XAMPP: Another FTP daemon is already running

resolution: link 3

Have a nice working day. :)

Upvotes: 3

Related Questions