加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

XAMPP PhpMyAdmin错误1045,“访问被拒绝用户’root’@’localhos

发布时间:2020-12-13 17:53:07 所属栏目:PHP教程 来源:网络整理
导读:我看到这个问题已被多次询问,但我找不到解决问题的方法.尝试在config.inc.php中尝试所有可能的组合 $cfg['Servers'][$i]['auth_type'] = 'http';$cfg['Servers'][$i]['user'] = 'root';$cfg['Servers'][$i]['password'] = 'root';$cfg['Servers'][$i]['exten
我看到这个问题已被多次询问,但我找不到解决问题的方法.尝试在config.inc.php中尝试所有可能的组合
$cfg['Servers'][$i]['auth_type'] = 'http';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'root';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';

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

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

我安装了XAMPP.在PhpMyAdmin中,我修改了root @ localhost的密码.我可以使用新密码登录PhpMyAdmin.

但是当我按照drupal安装步骤添加新用户Drupal时,我收到此错误:

Error 1045,"Access denied for user 'root'@'localhost' (Password: YES)

但仍然是drupal用户被创建但是mysql中的drupal数据库没有被创建.

当我尝试单独创建drupal数据库时,我能够做到这一点.

除此之外,我尝试了MySQL.exe -u root -p.它在那里工作正常,所以我不确定.

尝试改变

$cfg[‘Servers’][$i][‘host’] = ‘localhost’;

$cfg[‘Servers’][$i][‘host’] = ‘127.0.0.1’;

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读