我在Windows 10上安装了XAMPP.Apache服务器工作正常,但是当我尝试去#localhost / phpmyadmin'我收到错误:无法登录到配置中定义的控制用户的MySQL服务器/连接失败。
我已在同一台机器上使用wamp本地服务器,但我已在xampp中更改了apache和mysql的端口号。
这是我的config.inc.php文件:
$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'] = '';
我也试过评论" controluser"和" controlpass"但仍然无法解决问题。
答案 0 :(得分:0)
取消注释以下设置并删除mysql密码(如果已设置)。
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';
不要为controlpass设置任何密码。让它空白。然后重启你apache。