I installed both MySQL and PhpMyAdmin via Homebrew. I get the following error when I try to login with root and its password:
Cannot log in to the MySQL server
I can log in to MySQL via the terminal with:
mysql -u root -p
PhpMyAdmin config:
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'pass';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;
I'm running this on apache. I tried all the solutions on stackoverflow but they don't seem to work. Can anyone help me?
解决方案
You can use both localhost or 127.0.0.1 as host declaration.
In your case you can try to use localhost and it will work.