Showing posts with label XAMPP- Another web server daemon is already running. Show all posts
Showing posts with label XAMPP- Another web server daemon is already running. Show all posts

Saturday, April 13, 2013

XAMPP: Another web server daemon is already running / XAMPP: Another MySQL daemon is already running.


XAMPP: Another web server daemon is already running.
XAMPP: Another MySQL daemon is already running.



There are two ways to remove these errors.
1) Stop the running services
$ sudo service service-name stop
If you are using Debian or Ubuntu :
$ sudo service apache2 stop $ sudo service mysql stop
If you are using CentOS , RHEL or Fedora :
$ sudo service httpd stop $ sudo service mysqld stop

2) Kill the running services

Now here is the second method.

XAMPP-web server works on port 80 and XAMPP-MySQL works on port 3306.

We have to find the services of respective ports and kill them.

Run following command in terminal
$ sudo netstat -lnp | grep -e :80 -e :3306

It will show you all processes of port 80 & 3306 like this
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      15268/apache2   
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      14699/mysqld 

Now kill them using
$ sudo killall -9 process-name

It shows the process name beside pid (process id). In above example pid is 15268 & process-name is apache2. Another pid is 14699 & process-name is mysqld.

To kill the above processes, Run
$ sudo killall -9 apache2 $ sudo killall -9 mysqld
Now if you start XAMPP, it does not give process running error.

But if it still gives, kill the running process again.

You can kill the processes using pid too.
$ sudo kill -9 pid

To kill the above processes, Run
$ sudo kill -9 15268 $ sudo kill -9 14699