当前位置: 首页 > 知识库问答 >
问题:

拒绝用户“root”@"localhost“的phpMyAdmin访问(使用密码:NO)

东门秦迟
2023-03-14

我无法在xampp中连接到我的MySQL,我出现以下错误:

<?php
/*
* This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg['blowfish_secret'] = 'xampp'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */

/*
* Servers configuration
*/
$i = 0;

/*
* First server
*/
$i++;

/* 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'] = '';

/* Bind to the localhost ipv4 address and tcp */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';

/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';

/* Advanced phpMyAdmin features */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
$cfg['Servers'][$i]['relation'] = 'pma__relation';
$cfg['Servers'][$i]['table_info'] = 'pma__table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma__column_info';
$cfg['Servers'][$i]['history'] = 'pma__history';
$cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['users'] = 'pma__users';
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
$cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
$cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
$cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';
$cfg['Servers'][$i]['favorite'] = 'pma__favorite';

/*
 * End of servers configuration
 */

共有1个答案

潘修文
2023-03-14

在我刚刚更改的配置文件中找到了一个解决方案

$cfg['Servers'][$i]['auth_type'] = 'config';

$cfg['Servers'][$i]['auth_type'] = 'HTTP';
 类似资料:
  • 问题内容: 当我在PHPMyAdmin中设置root密码时,出现以下错误: 我无法打开PHPMyAdmin面板。我究竟做错了什么? 问题答案: 编辑您的phpmyadmin config.inc.php文件,如果您有密码,请在以下代码中将其插入密码前面:

  • 我知道这个标题看起来很熟悉,但不是。我正在处理一个web应用程序,当我运行它时,它显示:用户'root'@'localhost'的访问被拒绝(使用密码:NO)。我搜索了一些网站,他们说我应该使用密码。所以我使用mysql控制台更改了密码。我得到的消息是拒绝用户'root'@'localhost'的访问(使用密码:YES)。当我重新进入mysql控制台并输入密码时,它会发出一声哔哔声,然后关闭。我得

  • 问题内容: 我是MySQL的新手,我想在Windows桌面上运行WordPress,它需要MySQL。 我安装了Microsoft提供的所有内容。我从来没有为MySQL设置过root密码,在安装WordPress的最后一步中,它要求输入MySQL服务器密码。 root的默认密码是多少(如果有的话)以及如何更改它? 我试过了: 但是它显示了我: 在此之后,我尝试: 但是,它要求输入我没有的密码。 更

  • 我正在Windows 7 64位上使用WAMP服务器2。 当我使用root用户输入phpmyadmin时,它显示错误: " #1045 -拒绝用户' root'@'localhost的访问(使用密码:否)" 如果我更改用户名,则它允许我显示phpmyadmin页面。 如果我创建数据库,那么它会向我显示一个错误: “#1044-用户“@本地主机”对数据库“family”的访问被拒绝” 并表示至少需要

  • 这似乎是多余的,但我无法找到一个正确的解决方案。 我无法使用mysql控制台登录到mysql。它要求一个密码,我不知道我实际上输入了什么。有办法获取密码或更改密码吗?(这就是我config.inc的样子。 当我尝试打开phpmyadmin我得到这个错误(#1045-访问拒绝用户'root'@'localhost'(使用密码:是)) 我尝试卸载(并删除了所有相关文件)WAMP并重新安装。这也没有帮助

  • 一直以来,我都试图在wamp服务器中打开phpMyAdmin,并试图使用默认用户名和密码登录,即分别为“root”和“root”,但显示的错误相同。 phpMyAdmin试图连接到MySQL服务器,服务器拒绝了连接。您应该检查配置中的主机、用户名和密码,并确保它们与MySQL服务器管理员提供的信息相对应。 即使在卸载wamp并重新安装之后,它也会显示相同的错误。 我已经浏览了与该问题相关的所有帖子