我看到这个问题已经被问过很多次了,但是我没有找到解决我的问题的方法。在 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
。它在那里工作正常,所以我不确定。
最佳答案
在 config.inc.php 中
编辑
$cfg['Servers'][$i]['auth_type'] = 'whatever_it_is';
到
$cfg['Servers'][$i]['auth_type'] = 'cookie';
然后重启。
神奇的事情会发生!!
关于php - XAMPP PhpMyAdmin 错误 1045, "Access denied for user ' root' @'localhost',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21282901/