I've been trying to set mysql and phpMyAdmin for the last 12 hours, without any success. And yes, after hours and hours of Google-ing I know that is a common problem and I've read similar queries on stackoverflow but still can't come with the solution.....
I've tried everything - from changing the
$cfg['Servers'][$i]['port']
in the config.inc.php
file to 3306
, 127.0.0.1
....
typing the socket path in the config.inc.php
file - both tmp/mysql.php
and the /var/mysql/mysql.sock
.
I've tried changing the socket path in the my.cnf file and the php.ini....but I keep getting the same error:
#2002 - No such file or directory
The server is not responding (or the local server's socket is not correctly configured).
I'm using MySQL (5.1.65), PhpMyAdmin (3.5.2.2) and PHP (5.3.8).
To access phpMyAdmin from XAMPP you will need to make sure you have Apache and MySQL running in the XAMPP control panel by clicking the start buttons under the Actions column. If Apache and MySQL are green then all is well. Then you can click the “Admin” button in the MySQL row and that will launch phpMyAdmin.
Try starting MySQL and Apache in Xampp. Verify Port Number assigned to Apache (By default it should be 80). Now load localhost/phpmyadmin . It solved my problem.
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.
Once phpMyAdmin is installed point your browser to http://localhost/phpmyadmin to start using it. You should be able to login using any users you've setup in MySQL. If no users have been setup, use admin with no password to login.
I have recently encountered this problem on Mac OS Sierra too. Apache server is working but mysql is not. After searching for a solution, reading lots of posts I found this solution. And it worked!
The solution is to navigate to the mysql folder, in my case its,
/Applications/MAMP/db/mysql56/
and remove all the files except folders. Then restart MAMP again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With