gpt4 book ai didi

mysql - XAMPP #1045 - 用户访问被拒绝

转载 作者:行者123 更新时间:2023-11-29 22:17:20 25 4
gpt4 key购买 nike

最近尝试通过 phpmyadmin 更新 sql 用户密码,现在我收到此错误:

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

我搜索了数十个堆栈帖子,人们接受的解决方案似乎都不适合我。我尝试编辑 phpMyAdmin config.inc.php 来设置新密码,并将其完全留空 - 但没有成功。

当前配置文件如下所示:

/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$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'] = '';

我现在完全迷失了。任何帮助表示赞赏。我以为我知道密码(这是我不久前设置的),但在尝试为新数据库安装 CMS 的新实例时,它不接受密码,因此我尝试创建一个新密码) .

我尝试更改身份验证类型:

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

这使我能够手动输入现在设置的详细信息。但它仍然说他们不正确,不知何故......

最佳答案

您需要在配置文件中的这一行提供新密码:

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

如果您忘记了 root 密码,请按照说明操作 here重置它。

关于mysql - XAMPP #1045 - 用户访问被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31102403/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com