热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

XAMPPphpMyadmin:更改密码后访问被拒绝

如何解决《XAMPPphpMyadmin:更改密码后访问被拒绝》经验,为你挑选了1个好方法。

嗨,我知道这是一个古老的问题,但我已经尝试了许多答案和指南,但都是徒劳的.之前我在本地机器上使用的是没有密码的phpmyadmin,我使用命令提示符在Windows上使用以下命令更改了密码

mysqladmin.exe -u root密码root

从那时起,我无法打开我的localhost/phpmyadmin,我得到以下错误

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

我试过更改config.inc.php这个文件的当前状态如下

$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'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';

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

我尝试从localhost/security.php更改密码,并将密码更改为123.我还尝试通过打开resetroot.bat批处理文件来重置 root密码.我认真地认为我搞砸了所以如果有人能在这里帮助我,我将感激不尽.我在Windows 7上使用Xampp

编辑此外,我想告诉你,我已经尝试给新密码

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

还有

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

将用户更改为root



1> Holger..:

打开xampp/phpMyAdmin/config.inc并更改该行

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

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

然后PhpMyAdmin将显示一个登录屏幕,您可以在其中输入您的用户名和密码.


推荐阅读
author-avatar
森tu罗宝殿
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有