嗨,我知道这是个老问题,但我尝试了很多答案和指导,但都是徒劳的。以前,我在本地机器上使用没有密码的phpmyadmin,使用下面的命令在windows上使用命令提示符更改密码
mysqladmin.exe -u根密码根
从那时起,我无法打开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批处理文件重新设置根密码。我真的认为我把一切都搞砸了,所以如果有人能在这里帮助我,我将非常感谢。I在windows 7上使用Xampp
编辑,我还想告诉您,我已经尝试给出新的密码
$cfg['Servers'][$i]['password'] = '';同时也
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';将用户更改为根
发布于 2017-04-02 12:28:15
打开xampp/phpMyAdmin/config.inc并更改行
$cfg['Servers'][$i]['auth_type'] = 'config';至
$cfg['Servers'][$i]['auth_type'] = 'cookie';然后,PhpMyAdmin将显示一个登录屏幕,您可以在其中输入用户名和密码。
发布于 2015-03-13 06:30:08
使用命令提示符将根密码定义为“root”,因此在配置中必须使用相同的:
$cfg['Servers'][$i]['password'] = 'root';发布于 2015-03-13 06:46:48
在xammp文件夹'C:\xampp\mysql‘中有一个名为resetroot.bat的批处理文件,它将删除phpadmin密码。然后,您所需要做的就是在xammp中启动MySQL服务并单击管理按钮。
https://stackoverflow.com/questions/29026106
复制相似问题