简体   繁体   中英

cannot login to mysql server in xampp

I have installed XAMPP on windows 10. Apache server is working fine, but when I try to go to 'localhost/phpmyadmin' I get the error : Cannot log in to the MySQL server / Connection for controluser as defined in your configuration failed.

I am already using wamp local server on the same machine but I have changed the port number for apache and mysql in xampp.

Here is my config.inc.php file:

$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg'Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;

$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';

//$cfg['Servers'][$i]['controluser'] = 'pma';
//$cfg['Servers'][$i]['controlpass'] = '';

I have also tried commenting out "controluser" and "controlpass" but still could not resolve the issue.

Uncomment the below settings and remove the mysql password if it is set already.

$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = ''; 

And do not set any password for controlpass. Let it be blank. Then restart you apache.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM