我无法访问phpMyAdmin

时间:2015-10-02 14:54:53

标签: php phpmyadmin xampp ubuntu-12.04

尝试访问phpMyAdmin时,这是我收到的错误消息:欢迎使用phpMyAdmin

错误MySQL说:文档

Cannot connect: invalid settings. 
Connection for controluser as defined in your configuration failed.

phpMyAdmin尝试连接到MySQL服务器,服务器拒绝连接。您应该检查配置中的主机,用户名和密码,并确保它们与MySQL服务器管理员提供的信息一致。

2 个答案:

答案 0 :(得分:1)

在第23行检查\ xampp \ phpMyAdmin \ config.inc.php

$cfg['Servers'][$i]['AllowNoPassword'] = true;

所有身份验证都将在

之下
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';

然后重启XAMPP

你也可以在这里查看

的xampp / htdocs中/ XAMPP / cds.php

check line 4 to: mysql_connect("localhost","root","");
and line 78 to: if(!mysql_connect("localhost","root",""))

答案 1 :(得分:0)

  

1.打开根XAMPP文件目录C:/XAMPP/phpmyadmin/config.inc并向下滚动到:

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

2.Edit" 127.0.0.1"使用您的端口号将第27行传送到localhost,例如localhost:80。

结果:

$cfg['Servers'][$i]['host'] = 'localhost:80';
  

3.删除pma,[' controluser'] =' pma'。

结果:

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

然后最终尝试使用localhost或刷新页面进行访问。快乐=] D