Reputation: 7404
I have wampserver 2.2, PHP 5.3.9, Mysql 5.0.8 and windows 8 as an operating system. I have installed wampsever recently and localhost is working fine with it but when I am trying to open phpadmin through wamp system tray icon it showing the following error :
Error MySQL said: Documentation #2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)
I am searching from last couple of days in google to resolve this issue but not getting any solution. Following is my config.inc.php file
<?php
/* Servers configuration */
$i = 0;
/* Server: localhost [1] */
$i++;
$cfg['Servers'][$i]['verbose'] = 'localhost';
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['port'] = '3306';
$cfg['Servers'][$i]['socket'] = '/tmp/mysql.sock';
$cfg['Servers'][$i]['connect_type'] = 'socket';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'root';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
/* End of servers configuration */
$cfg['DefaultLang'] = 'en-utf-8';
$cfg['ServerDefault'] = 1;
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
/* rajk - for blobstreaming */
$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
?>
Need help for this. Thanks in advance.
Upvotes: 0
Views: 11800
Reputation: 3290
You can follow the below to resolve the problem.
Step1:
Go to the my.ini
file and changed the setting for mysql socket = "MySQL" to "/tmp/mysql.sock".
Step2:
Then do the same in the php ini
file and restart the Web server whether it is WAMP or XAMP!
If you are using XAMP
then you can try one more thing:
To fix the #2002 problem, open your config.inc.php with path:
\xampp\phpMyAdmin
at your XAMPP directory and add the following code:
$cfg['Servers'][$i]['socket'] = '/var/run/mysql/mysql.sock';
or
$cfg['Servers'][$i]['connect_type'] = 'tcp';
Hope using the above steps, you will get the solution. Please mark the answer resolved if it is relevant to solve the problem.
Upvotes: 1
Reputation: 12180
This applies to the same under Linux Debian based systems.
Probably this error will happen when you have mysql installed separately. Just remove it [if you don't need it] by the following commands and then you can use mysql via phpmyadmin. This worked for me:
sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean
Upvotes: 2
Reputation: 1
I have encounter the same problem and did the following to solve it:
Upvotes: 0
Reputation: 147
"Error MySQL said:
This happened to me today, and it turned out to be simply that MySQL had not started, even though it's configured to start automatically. Search for Services, find MySQL in the list, and click on Start the service. (Don't ask me why this fault is suddenly happening).
Upvotes: 0
Reputation: 37
Did you run the setup script for the first time?, in order to allow access to local-server (specially in win 8) & make sure you always run it as admin.
If you have access to phpmyadmin you can do the above step from setting tab, in more setting option.
If you are having trouble setting this up, let me know and i will tell you more details about it.
All right, Do the following steps , i assume that you have access to phpmyadmin, if not go to wamp directory -> alias -> open phpmyadmin.conf
Change the following code :
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
To
Order Allow,Deny
Allow from all
Then save it.
Afterwards, Go to wamp tray icon -> right click -> put the server online
That should allow you to have access in both localhost and phpmyadmin
in more settings you will find link to SetupScript , should be in
localhost/phpmyadmin/setup/index.php
under servers, hit new server
I hope that helps, if you need further information, Dont hesitate to ask :)
Upvotes: 3