5

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.
Marc Delisle
  • 8,879
  • 3
  • 29
  • 29
Abnet Hussien
  • 157
  • 1
  • 2
  • 14
  • Please read [Under what circumstances may I add “urgent” or other similar phrases to my question, in order to obtain faster answers?](//meta.stackoverflow.com/q/326569) - the summary is that this is not an ideal way to address volunteers, and is probably counterproductive to obtaining answers. Please refrain from adding this to your questions. – halfer Dec 05 '18 at 08:43
  • It's to be expected that phpMyAdmin returns a "cannot connect" message if the MySQL server is not running. – Marc Delisle Dec 05 '18 at 14:48
  • Hope this will help https://stackoverflow.com/questions/41881123/mysqli-real-connect-hy000-2002-no-such-file-or-directory – Sasikumar Murugesan Jan 11 '19 at 16:55

10 Answers10

9

I fixed by :

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

Niyaz
  • 797
  • 1
  • 8
  • 18
  • 1
    not working for me still Failed to stop mysql.service: Unit mysql.service not loaded. masterofdeath@duke-pc:~$ sudo /opt/lampp/lampp restart Restarting XAMPP for Linux ... XAMPP: Stopping Apache...ok. XAMPP: Stopping MySQL...not running. XAMPP: Stopping ProFTPD...ok. XAMPP: Starting Apache...ok. XAMPP: Starting MySQL...ok. XAMPP: Starting ProFTPD...ok. masterofdeath@duke-pc:~$ /opt/lampp/bin/mysql.server: 264: kill: No such process – Shreyan Mehta Jan 28 '20 at 03:06
8

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
tingwai
  • 81
  • 1
  • 2
3

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. :)

  • Not working sudo chmod -R 777 /opt/lampp $ sudo chown -hR nobody /opt/lampp $ sudo chmod -R 755 /opt/lampp $ sudo service mysql stop Failed to stop mysql.service: Unit mysql.service not loaded. $ sudo /opt/lampp/lampp restart Restarting XAMPP for Linux ... XAMPP: Stopping Apache...ok. XAMPP: Stopping MySQL...not running. XAMPP: Stopping ProFTPD...ok. XAMPP: Starting Apache...ok. XAMPP: Starting MySQL...ok. XAMPP: Starting ProFTPD...ok. $ /opt/lampp/bin/mysql.server: 264: kill: No such process – Shreyan Mehta Jan 28 '20 at 03:10
1

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

Nayana Chandran
  • 1,416
  • 1
  • 16
  • 30
1

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.

0

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

0

This error message typically indicates that the process you are trying to kill does not exist.

Here are some possible reasons for this error:

The process may have already terminated on its own. The process may not have been started in the first place. You may have mistyped the process ID or the process name. To troubleshoot this issue, you can try the following:

Check if the process is still running by using the ps command. For example, you can use ps aux | grep mysql to see if the MySQL process is still running.

Make sure that you are using the correct process ID or process name when trying to kill the process.

If the process is still running and you are sure that you are using the correct process ID or process name, try using the kill command with the -9 option to force the process to terminate. For example: kill -9

  • This non-answer that attempts to answer some question that wasn't asked looks like it was generated by an AI (like ChatGPT), not by an actual human being. You should be aware that [posting AI-generated output is officially **BANNED** on Stack Overflow](https://meta.stackoverflow.com/q/421831). If this answer was generated by an AI, then I strongly suggest you delete it before you get yourself into even bigger trouble: **WE TAKE PLAGIARISM SERIOUSLY HERE.** Please read: [Why posting GPT and ChatGPT generated answers is not currently acceptable](https://stackoverflow.com/help/gpt-policy). – tchrist Jul 04 '23 at 17:25
0

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

Nik
  • 55
  • 1
  • 6
-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.

Simson
  • 3,373
  • 2
  • 24
  • 38
nas
  • 1
-2

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
Poshi
  • 5,332
  • 3
  • 15
  • 32