22

I have been through lots of forums and checked various posts on similar topic but non seems to work out for me.

I have freshly installed XAMPP 1.7.7 on my Ubuntu 11.10 Operating system. Everything is running except for the phpMyAdmin.

Upon hitting: http://localhost/phpmyadmin, I am getting the following error:

MySQL said:

#2002 - The server is not responding 
(or the local MySQL server's socket is not correctly configured) 

Connection for controluser as defined in your configuration failed.

When i am starting the services with: sudo /opt/lampp/lampp start
I am getting the following:

XAMPP: Another web server daemon is already running.
XAMPP: Another MySQL daemon is already running.
XAMPP: Another FTP daemon is already running.
XAMPP for Linux started.

Any suggestions would be greatly appreciated.

CompilingCyborg
  • 4,494
  • 12
  • 41
  • 60

11 Answers11

74

It turns out that the solution is to stop all the related services and solve the “Another daemon is already running” issue.

The commands i used to solve the issue are as follows:

sudo /opt/lampp/lampp stop              
sudo /etc/init.d/apache2 stop    
sudo /etc/init.d/mysql stop

Or, you can also type instead:

sudo service apache2 stop
sudo service mysql stop

After that, we again start the lampp services:

sudo /opt/lampp/lampp start

Now, there must be no problems while opening:

http://localhost                  
http://localhost/phpmyadmin
j00lz
  • 279
  • 1
  • 11
CompilingCyborg
  • 4,494
  • 12
  • 41
  • 60
  • @surajmishra I am getting command not found for: sudo service apache2 stop sudo service mysql stop And I'm also getting unrecognised service for sudo service apache2 stop sudo service mysql stop – Naguib Ihab Jan 17 '15 at 21:47
  • you need to add a "/" to the first command so that it reads: sudo /opt/lampp/lampp stop. not the current sudo opt/lampp/lampp stop – psvj Jun 23 '15 at 22:03
  • 1
    its not working in my case. I have stop and start but its not working. the same error – jameshwart lopez Oct 04 '16 at 01:52
  • Hi there, so does it means that we have installed mysql at two points ? and when first point stop (sudo service mysql stop) The mysql of (sudo /opt/lampp/lampp start) works in. How do i get rid of it permanently ? I need to uninstall linux service of mysql – Habib Rehman Apr 08 '17 at 10:24
  • I don't think this is blocked by `mysql` service, oh I wasted 2 days for this. – newbie Aug 11 '17 at 16:42
  • Thank you. I too was having the conflict of xampp and lampp The solution made my day :) – Niroj Shr Feb 09 '18 at 06:51
7
  1. Open config.default.php file under phpmyadmin/libraries/
  2. Find $cfg['Servers'][$i]['host'] = 'localhost'; Change to $cfg['Servers'][$i]['host'] = '127.0.0.1';
  3. refresh your phpmyadmin page, login
brucenan
  • 584
  • 8
  • 20
4

At each point in these instructions, check to see if the problem is fixed. If so, great! Otherwise, continue.

  1. Get to Services. (I was able to right click the Apache launch icon to get there.)
  2. Scroll down to MySQL. Click to start. This will get rid of the #2002 error. Now you'll have a new error:

#1045 - Access denied for user 'root'@'localhost' (using password: NO)

  1. Edit the C:\wamp\apps\phpmyadmin3.5.1\config.inc.php file, changing $cfg['Servers'][$i]['extension'] = 'mysqli'; to instead be= 'mysql'
  2. Open Services again and Stop MySQL
  3. While in Services, Start wampmysqld

This is convoluted, I know, but that's what worked for me. Some posts may say you need a password in the config file, but you don't. Mine is still ""

Hope this helps.

Jack
  • 10,783
  • 12
  • 46
  • 65
Michele
  • 41
  • 2
2

The problem might be with service mysql-server and apache2 running while system start. You can do the following.

sudo /opt/lampp/lampp stop

To stop already running default services

sudo service apache2 stop
sudo service mysql  stop

To remove the services completely, so that they won't create problem in next system-restart, If you are in ubuntu(debian)

sudo apt-get remove apache2
sudo apt-get remove mysql-server

If you are in redhat or other, You could use yum or similar command to uninstall the services

Then start the lampp again

sudo /opt/lampp/lampp start

Also, don't install mysql-server in the system, because it might start in system start-up, occupy the port, and create problem for mysql of lampp.

Rajan
  • 1,343
  • 3
  • 19
  • 31
  • I am getting command not found for: udo apt-get remove apache2 sudo apt-get remove mysql-server And I'm also getting unrecognised service for sudo service apache2 stop sudo service mysql stop – Naguib Ihab Jan 17 '15 at 21:54
2

I stopped MySQL sudo service mysql stop and then started xammp sudo /opt/lampp/lampp start and it worked!

Snaily
  • 21
  • 2
1

Go to phpMyAdmin/config.inc.php edit the line

$cfg['Servers'][$i]['password'] = '';

to

$cfg['Servers'][$i]['password'] = 'yourpassword';

This problem might occur due to setting of a password to root, thus phpmyadmin is not able to connect to the mysql database.

And the last thing change

$cfg['Servers'][$i]['extension'] = 'mysql';

to

$cfg['Servers'][$i]['extension'] = 'mysqli';

Now restart your server. and see.

Alexander
  • 22,498
  • 10
  • 56
  • 73
Hemanta Nandi
  • 149
  • 1
  • 3
1

Go to config.inc.php file using terminal by typing the following:

sudo gedit /opt/lampp/phpmyadmin/config.inc.php

The file will open in gedit.

Now open the file and edit

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

to

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

and keep the username as: root password:

Also make sure that the lines with username and password are not commented:

//$cfg['Servers'][$i]['user'] = 'root'; //$cfg['Servers'][$i]['password'] = '';

Make sure that // is removed from the above lines.

Phiter
  • 12,987
  • 14
  • 45
  • 77
Pragya
  • 57
  • 12
0

please check the mysql.ini file in your xampp mysql installation... its found on xampp/mysql/bin directory

check the line 43

> log_error="mysql_error.log"
> #bind-address="127.0.0.1"

uncomment the line 43 if its still commented

Netorica
  • 16,405
  • 16
  • 70
  • 105
  • I can't find the mysql.ini file at all in my opt/lampp directory. I did search recursively in this directory for the file but found nothing. Could it possibly be of different name? – CompilingCyborg May 03 '12 at 07:13
  • that was my same problem in my windows box... very same error message that's why i just posted it as my answer. is there any opt/lampp/mysql? directory? – Netorica May 03 '12 at 07:19
  • Thanks for your help through this. My operating system is Ubuntu 11.10. No actually there is no directory of opt/lampp/mysql. I think the linux version of XAMPP 1.7.7 has different way of arranging the files and folders. – CompilingCyborg May 03 '12 at 10:46
0

Though I'm using Mac OS 10.9, this solution may work for someone else as well, perhaps on Ubuntu.

In the XAMPP console, I only found that phpMyAdmin started working again after restarting everything including the Apache Web Server.

No problemo, now.

Soren Wagner
  • 73
  • 1
  • 1
  • 5
0

You can check it by connecting MySQL through the command prompt.

I think that your MySQL Database is blocked by firewall. Once stop all the services of antivirus software you have on your computer, then try to connect.

I faced this problem as well and rectified by blocking all firewalls..

venerik
  • 5,486
  • 1
  • 29
  • 41
Mak
  • 11
-1

Goto xampp folder in local drive c, click on mysql folder, then click on bin and finally click on "mysqladmin" application. Then go back and refresh your browser and the problem is solved.