访问 http:///localhost/phpmyadmin/ 页面时拒绝访问
Access Denied while accessing http://localhost/phpmyadmin/ page
我已经在opensuse13.2中安装了xampp。它安装得很整齐。但是我在访问 http://localhost/phpmyadmin/ 页面时遇到以下错误。我在这里尝试了几个答案,但 none 正在提供帮助,例如将密码设置为“”或“”。尝试通过 'http' 而不是 'config' 进行身份验证。但是 none 正在工作。
MySQL 说:文档
无法连接:设置无效。
您的配置中定义的 controluser 连接失败。
phpMyAdmin 尝试连接到 MySQL 服务器,但服务器拒绝了连接。您应该检查配置中的主机、用户名和密码,并确保它们与 MySQL 服务器管理员提供的信息相对应。
以下是phpmyadmin/config.inc.php文件的内容。
/**
* Servers configuration
*/
$i = 0;
/**
* First server
*/
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'root';
/* Server parameters */
//$cfg['Servers'][$i]['host'] = 'localhost';
//$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = true;
/**
* phpMyAdmin configuration storage settings.
*/
/* User used to manipulate with storage */
// $cfg['Servers'][$i]['controlhost'] = '';
// $cfg['Servers'][$i]['controlport'] = '';
$cfg['Servers'][$i]['controluser'] = 'root';
$cfg['Servers'][$i]['controlpass'] = 'root';
/* Storage database and tables */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
我建议尝试将密码和控制密码设置为 '';
而不是 'root';
。
P.S。它可能对 post 您目前所尝试的内容有所帮助。这样我们就不会重复可能的解决方案。
P.P.S。我无法评论,添加另一个答案似乎不合适,所以我只编辑这个。
也许你可以设置端口?标准的是 80,但有时其他程序(例如 Skype)也会使用它。所以你可能想使用 8080。但是你应该将 localhost 更改为 localhost:8080。
P.P.P.S。也许您已经找到了,但这里有一些链接可能会提供有用的信息:
http://www.prestadocumentation.com/how-to-install-phpmyadmin/
http://wpquestions.com/question/showChrono/id/8374
将此行更改为
$cfg['Servers'][$i]['password'] = 'root';
到
$cfg['Servers'][$i]['password'] = '';
并尝试不使用密码登录
并更改此行
$cfg['Servers'][$i]['controluser'] = 'root';
$cfg['Servers'][$i]['controlpass'] = 'root';
到
$cfg['Servers'][$i]['controluser'] = '';
$cfg['Servers'][$i]['controlpass'] = '';
更新:修改线路后重启。你的代码中有下面这行,它允许用户不用密码登录,上面的代码在删除密码后有效
$cfg['Servers'][$i]['AllowNoPassword'] = true;
我已经在opensuse13.2中安装了xampp。它安装得很整齐。但是我在访问 http://localhost/phpmyadmin/ 页面时遇到以下错误。我在这里尝试了几个答案,但 none 正在提供帮助,例如将密码设置为“”或“”。尝试通过 'http' 而不是 'config' 进行身份验证。但是 none 正在工作。
MySQL 说:文档
无法连接:设置无效。 您的配置中定义的 controluser 连接失败。 phpMyAdmin 尝试连接到 MySQL 服务器,但服务器拒绝了连接。您应该检查配置中的主机、用户名和密码,并确保它们与 MySQL 服务器管理员提供的信息相对应。
以下是phpmyadmin/config.inc.php文件的内容。
/**
* Servers configuration
*/
$i = 0;
/**
* First server
*/
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'root';
/* Server parameters */
//$cfg['Servers'][$i]['host'] = 'localhost';
//$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = true;
/**
* phpMyAdmin configuration storage settings.
*/
/* User used to manipulate with storage */
// $cfg['Servers'][$i]['controlhost'] = '';
// $cfg['Servers'][$i]['controlport'] = '';
$cfg['Servers'][$i]['controluser'] = 'root';
$cfg['Servers'][$i]['controlpass'] = 'root';
/* Storage database and tables */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
我建议尝试将密码和控制密码设置为 '';
而不是 'root';
。
P.S。它可能对 post 您目前所尝试的内容有所帮助。这样我们就不会重复可能的解决方案。
P.P.S。我无法评论,添加另一个答案似乎不合适,所以我只编辑这个。
也许你可以设置端口?标准的是 80,但有时其他程序(例如 Skype)也会使用它。所以你可能想使用 8080。但是你应该将 localhost 更改为 localhost:8080。
P.P.P.S。也许您已经找到了,但这里有一些链接可能会提供有用的信息: http://www.prestadocumentation.com/how-to-install-phpmyadmin/ http://wpquestions.com/question/showChrono/id/8374
将此行更改为
$cfg['Servers'][$i]['password'] = 'root';
到
$cfg['Servers'][$i]['password'] = '';
并尝试不使用密码登录
并更改此行
$cfg['Servers'][$i]['controluser'] = 'root';
$cfg['Servers'][$i]['controlpass'] = 'root';
到
$cfg['Servers'][$i]['controluser'] = '';
$cfg['Servers'][$i]['controlpass'] = '';
更新:修改线路后重启。你的代码中有下面这行,它允许用户不用密码登录,上面的代码在删除密码后有效
$cfg['Servers'][$i]['AllowNoPassword'] = true;