php 配置中定义的控制用户连接失败。xampp

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11186588/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-24 23:56:32  来源:igfitidea点击:

Connection for control user as defined in your configuration failed. xampp

phpphpmyadmin

提问by Zann

when i tried to uninstall xampp and reinstall xampp.I received below error message when i go phpmyadmin

当我尝试卸载 xampp 并重新安装 xampp 时,当我转到 phpmyadmin 时收到以下错误消息

Need help and guide to solve it .thanks

需要帮助和指导来解决它。谢谢

Error

错误

MySQL said: Documentation

MySQL 说: 文档

1045 - Access denied for user 'root'@'localhost' (using password: NO)

1045 - 用户 'root'@'localhost' 的访问被拒绝(使用密码:NO)

Connection for controluser as defined in your configuration failed.

配置中定义的 controluser 连接失败。

phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.

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

回答by Fred Ondieki

Basically what is happening here is that you have wrong credentials in your[ .../phpMyadmin/config.inc.php] file .This occurs if you have another mysql instance installed and the username and the passowrd that you use in this file is different.You have to change the username and the password in the above file to match.

基本上这里发生的事情是你的 [ .../phpMyadmin/config.inc.php] 文件中有错误的凭据。如果你安装了另一个 mysql 实例并且你在这个文件中使用的用户名和密码是,就会发生这种情况不同。您必须更改上述文件中的用户名和密码才能匹配。

/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root'; //Change this to your values
$cfg['Servers'][$i]['password'] = 'root';  //Change this to your values
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';

回答by Obmerk Kronen

Try changing localhostto 127.0.0.1. On my machine this was the culprit..

尝试更改 localhost127.0.0.1. 在我的机器上,这是罪魁祸首..

回答by René H?hle

Perhaps you have set a new password during the installation of xampp.

也许您在安装 xampp 的过程中设置了新密码。

First solution:Delete the complete XAMPP folder after installation but safe the htdocs folder before.

第一种解决方案:安装后删除完整的 XAMPP 文件夹,但之前请确保 htdocs 文件夹安全。

Second:Go to the config file "phpmyadmin/config.inc.php" there are the information for the control user. Check the values.

第二:进入配置文件“phpmyadmin/config.inc.php”,里面有控制用户的信息。检查值。

Third option:Take a console a call the programm "xampp/mysql/bin/mysql.exe"when you use Windows with this you can connect to the database. Something like "mysql.exe -uroot -p".

第三个选项:当您使用 Windows 时,使用控制台调用程序“xampp/mysql/bin/mysql.exe”,您可以连接到数据库。类似于"mysql.exe -uroot -p"

回答by Hossein SB

Navigate to the phpMyAdmin folder in XAMPP open the file config.inc.php which can be found in the following path:

导航到 XAMPP 中的 phpMyAdmin 文件夹,打开文件 config.inc.php,该文件可以在以下路径中找到:

In Windows C:\xampp\phpmyadmin\config.inc.php

在 Windows C:\xampp\phpmyadmin\config.inc.php

Under /* User for advanced features */, Replace

在 /* User for advanced features */ 下,替换

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

With

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

If you set password for user 'root' then edit These lines in same File:

如果您为用户“root”设置密码,则在同一文件中编辑这些行:

Under /* Authentication type and info */ Write your password

在 /* Authentication type and info */ 下写下你的密码

$cfg['Servers'][$i]['password'] = 'your_Password';

Under /* User for advanced features */, Write your password

在 /* User for advanced features */ 下,输入您的密码

$cfg['Servers'][$i]['controlpass'] = 'your_Password';

回答by Leads Olutions

I had a similar issues fresh install and same error surprising. After trying couple of forum help nothing seem to work and I thought it can't be that difficult...what was I missing with a new install?

我有一个类似的问题,全新安装和同样的错误令人惊讶。在尝试了几个论坛帮助后,似乎没有任何效果,我认为这不会那么困难……我在新安装中遗漏了什么?

Finally I figured out "COOKIES" AHA I love that Yummy Cookies but here we are talking about browser cookies...

最后我想出了“饼干”啊哈我喜欢美味的饼干但在这里我们谈论的是浏览器饼干......

  1. Try cleaning your browser coookies and see it helps to resolve this issue, before even trying any configuration changes.

  2. Try using XAMPP Control panel "Admin" button instead of usual http://localhost or http://localhost/phpmyadmin

  3. Try direct link: http://localhost/phpmyadmin/main.phpor http://127.0.0.1/phpmyadmin/main.php

  4. Finally Try this: http://localhost/phpmyadmin/index.php?db=phpmyadmin&server=1&target=db_structure.php

  1. 在尝试任何配置更改之前,尝试清理您的浏览器 cookie 并查看它是否有助于解决此问题。

  2. 尝试使用 XAMPP 控制面板“管理”按钮而不是通常的 http://localhost or http://localhost/phpmyadmin

  3. 尝试直接链接:http://localhost/phpmyadmin/main.phphttp://127.0.0.1/phpmyadmin/main.php

  4. 最后试试这个: http://localhost/phpmyadmin/index.php?db=phpmyadmin&server=1&target=db_structure.php

Somehow if you have old installation and you upgraded to new version it keeps track of your old settings through cookies.

不知何故,如果您有旧安装并升级到新版本,它会通过 cookie 跟踪您的旧设置。

回答by Deepak Kumar

enter image description here

在此处输入图片说明

It create problem to install any software with same like skype ... Or you start xampp later login to skype So Please start before xampp login skype ... No error will be appear

安装任何与skype相同的软件都会产生问题......或者你启动xampp后登录skype所以请在xampp登录skype之前启动......不会出现错误