Tal*_*lik 5 php mysql xampp phpmyadmin
嗨,我知道这是一个古老的问题,但我已经尝试了许多答案和指南,但都是徒劳的.之前我在本地机器上使用的是没有密码的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'] = '';
Run Code Online (Sandbox Code Playgroud)
我尝试从localhost/security.php更改密码,并将密码更改为123.我还尝试通过打开resetroot.bat批处理文件来重置 root密码.我认真地认为我搞砸了所以如果有人能在这里帮助我,我将感激不尽.我在Windows 7上使用Xampp
编辑此外,我想告诉你,我已经尝试给新密码
$cfg['Servers'][$i]['password'] = '';
Run Code Online (Sandbox Code Playgroud)
还有
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';
Run Code Online (Sandbox Code Playgroud)
将用户更改为root
打开xampp/phpMyAdmin/config.inc并更改该行
$cfg['Servers'][$i]['auth_type'] = 'config';
Run Code Online (Sandbox Code Playgroud)
至
$cfg['Servers'][$i]['auth_type'] = 'cookie';
Run Code Online (Sandbox Code Playgroud)
然后PhpMyAdmin将显示一个登录屏幕,您可以在其中输入您的用户名和密码.
小智 1
您使用命令提示符将 root 密码定义为“root”,因此在配置中您必须使用相同的密码:
$cfg['Servers'][$i]['password'] = 'root';
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
10117 次 |
| 最近记录: |