Alexander Alexander - 5 months ago 37
MySQL Question

Cannot log in to the MySQL server (PhpMyAdmin)

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'] = '';
$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 as host declaration.

In your case you can try to use localhost and it will work.