MySQL not starting in Xampp
38,561
Solution 1
Stop the mysql-server
service with
sudo service mysql stop
After that, just start mysql
from xampp
.
Solution 2
It's because the mysql installed in ubuntu takes over the port which will inturn block the mysql of xampp. try removing mysql completely from ubuntu and try again.
Related videos on Youtube
Author by
The Okay Man
Updated on September 18, 2022Comments
-
The Okay Man over 1 year
I am using Ubuntu 14.04 and Xampp 5.6.3-0. I cannot get the MySQL server to run. I have tried executing these commands so far (run in this order):
sudo chmod 755 /opt/lampp/etc/my.cnf sudo chmod -R 777 /opt/lampp/var/mysql sudo chown -hR root/opt/lampp
This produced:
chown: missing operand after ‘root/opt/lampp’
sudo chown -hR root:root /opt/lampp sudo chmod 755 /opt/lampp/etc/my.cnf sudo chmod 777 /opt/lampp/var/mysql -R sudo /opt/lampp/lampp restart
Which produced: (running this commend twice in a row produces the same result)
Restarting XAMPP for Linux 5.6.3-0... 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.
But the server will still not start after this, how do I get the server to start?
Edit:
$ sudo lsof -i TCP:3306 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME mysqld 1222 mysql 10u IPv4 10907 0t0 TCP localhost:mysql (LISTEN)`
and
$ sudo /etc/init.d/mysql status * /usr/bin/mysqladmin Ver 8.42 Distrib 5.5.40, for debian-linux-gnu on x86_64 Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Server version 5.5.40-0ubuntu0.14.04.1 Protocol version 10 Connection Localhost via UNIX socket UNIX socket /var/run/mysqld/mysqld.sock Uptime: 1 day 4 hours 35 min 35 sec
With all this when trying to connect to phpmyadmin I get:
-
Kiwy about 9 yearscan you gives us the result of the command
lsof -i TCP:3306
and/etc/init.d/mysql status
Because it really looks like MySQL worksStarting MySQL...ok
-
Kiwy about 9 yearsplease edit your question to add those informations. use
sudo lsof...
andsudo /etc/init.d/mys....
without root permission it will not be relevant -
The Okay Man about 9 years@Kiwy The results have been put into the question itself.
-
Rinzwind about 9 years"MySQL not starTing in Xampp" and "mysqld 1222 mysql 10u IPv4 10907 0t0 TCP localhost:mysql (LISTEN)" contradict each other. Mysql IS running.
-
Kiwy about 9 yearsThis is cleary mention here, in the result you posted your Database is already running. In fact, what is not starting ? It is pretty unclear what you're asking here.
-
The Okay Man about 9 years@Kiwy When I try to connect to it I get
The server is not responding (or the local server's socket is not correctly configured).
-
Kiwy about 9 yearsplease put all the information you add in your question not in comment, just comment to notify the update. Also explain cleary what you're trying and how.
-
David Foerster about 9 yearsDon't use XAMP on Linux! Use LAMP from the package repository! It's much better integrated with the rest of the system.
-
The Okay Man about 9 years@Kiwy I have updated the question.
-
Rinzwind about 9 years@DavidFoerster glad I found another person that agrees with me :-)
-
Karim Samir over 8 yearsit seems running , as I try with my local dev virtual host (website) and connect to mysql using SQLyog but there is a problem with phpmyadmin , same as error above
-
-
The Okay Man about 9 yearsCan you expend on this a bit more. To me this is unclear what you want me to do.
-
Mohamed about 9 yearsIn my case, i totaly uninstalled mysql package because it was running and preventing mysql from xampp to run.
-
john400 over 6 yearsThanks. Actually that worked for me just fine. I think the actual MySql and Apache we installed on our system were having some conflict with the XAmpp's apache and mysql. That's why we need to stop the already installed one so that the XAMPP's one start working.;)