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\
If you are using homebrew restart mariadb. I also had the same issue and after stopping and starting mariadb it started working again.
brew services restart mariadb
Had this problem on Windows 7 Ultimate, AppServ. Just reload SQL and Apache (but you need to reload both of them, reloading only Apache didn't worked).
PHPMyAdmin 4.6.6 Server: Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30 Server version: 5.7.17-log - MySQL Community Server (GPL) PHP: 5.6.30
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.