4

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: The server is not responding

11
  • can you gives us the result of the command lsof -i TCP:3306 and /etc/init.d/mysql status Because it really looks like MySQL works Starting MySQL...ok
    – Kiwy
    Feb 10, 2015 at 12:01
  • please edit your question to add those informations. use sudo lsof... and sudo /etc/init.d/mys.... without root permission it will not be relevant
    – Kiwy
    Feb 10, 2015 at 12:13
  • @Kiwy The results have been put into the question itself. Feb 10, 2015 at 12:23
  • "MySQL not starTing in Xampp" and "mysqld 1222 mysql 10u IPv4 10907 0t0 TCP localhost:mysql (LISTEN)" contradict each other. Mysql IS running.
    – Rinzwind
    Feb 10, 2015 at 12:44
  • 3
    Don't use XAMP on Linux! Use LAMP from the package repository! It's much better integrated with the rest of the system. Feb 10, 2015 at 12:53

5 Answers 5

6

Stop the mysql-server service with

sudo service mysql stop

enter image description here

After that, just start mysql from xampp.

enter image description here

1
  • Thanks. 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.;)
    – john400
    Sep 13, 2017 at 3:10
1

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.

0

I had the same problem, but I realised that you can't start and use MySQL from XAMPP while it is running. I think you have to stop it first (not using XAMPP command)

2
  • Can you expend on this a bit more. To me this is unclear what you want me to do. Feb 10, 2015 at 12:44
  • In my case, i totaly uninstalled mysql package because it was running and preventing mysql from xampp to run.
    – Mohamed
    Feb 10, 2015 at 12:58
0

Open phpMyAdmin>config.inc.php in your favourite text editor.

Search for:

$cfg['Servers'][$i]['auth_type'] = 'config';

Replace it with:

$cfg['Servers'][$i]['auth_type'] = 'cookie';

cookie ;) "essa eu garantio"

0

Try to delete pid files

$XAMPP_ROOT/logs/httpd.pid
$XAMPP_ROOT/var/mysql/$(hostname).pid
$XAMPP_ROOT/var/proftpd.pid

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .