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\
Am using MAMP on a macbook pro running High Sierra, and in my case, I tried all the above but it still did not work for me so I did the following :
Backup (ie. on a mac, right click and duplicate) the "config.inc.php" file before we touch it. You can call or rename it "config_old.inc.php"
Open the file in your favorite IDE or text editor.
i) $cfg['Servers'][$i]['host']
ii) $cfg['Servers'][$i]['port']
iii) $cfg['Servers'][$i]['socket']
Change from :
$cfg['Servers'][$i]['host'] = 'localhost';
to :
$cfg['Servers'][$i]['host'] = '127.0.0.1';
Change from :
$cfg['Servers'][$i]['port'] = '3306';
/this might be your default. Just check to see from your MAMP installation preference , press CMD + , and confirm that port number you have specified. In my case I had changed it to 8889./
to :
$cfg['Servers'][$i]['port'] = '8889';
Again depending on where you installed your MAMP or to be more specific your mysql.
Change from :
$cfg['Servers'][$i]['socket'] = 'some_folder_path or EMPTY';
to :
$cfg['Servers'][$i]['socket'] = '/Applications/MAMP/Library/bin/mysql/mysql.sock';
After this modification, save and refresh in your web browser.
Worked for me. Hope this helps. Cheers.