我将root密码更改为test,现在我无法登录XAMPP中的phpMyAdmin页面.我在这里寻找帮助,这里基本上说在XAMPP\PHPMYADMIN文件夹中更改了config.inc.php文件.
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'test'; <---- changed this
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = 'test'; <--- I changed this too (Edit: Not needed)
Run Code Online (Sandbox Code Playgroud)
以下代码使用上述密码
if($_SERVER['REMOTE_ADDR']=="127.0.0.1")
{
define("DATABASE_SERVER", "localhost");
define("DATABASE_USERNAME", "root");
define("DATABASE_PASSWORD", "test");
define("DATABASE_NAME", "TIGERWOODS");
}
Run Code Online (Sandbox Code Playgroud)
这发生在我身上,但我无法解决它.现在它再次发生在WinXP上.我正在使用Xampp 1.7.4.
小智 45
我遇到了同样的问题,所以我去了:
/xampp/phpmyadmin/config.inc.php
Run Code Online (Sandbox Code Playgroud)
我粘贴了我之前输入的密码,然后我再次访问了phpmyadmin,在特权标签/编辑/我选择了没有密码,然后一切都恢复了生命:)
您也可以将用户更改为admin,但您的phpmyadmin将位于管理员端,而您的其他localhost网站也将无法正常工作.
小智 27
我也有同样的问题,花了几个小时才想出来.
我刚刚将'config'改为'cookie'
$cfg['Servers'][$i]['auth_type'] = 'config';
Run Code Online (Sandbox Code Playgroud)
小智 14
Opsss.在我将用户更改为"admin"之后,它没有添加数据库的权限..因此我将用户更改为"root".
然后我从浏览器更改密码.
转到http:// localhost/security /,然后单击链接http://localhost/security/xamppsecurity.php.之后,将超级用户的密码更改为"root".
之后打开你的http:// localhost/phpmyadmin /
现在它有效.
Ham*_*han 13
上面的代码修复了大多数ppl的问题,但我仍然无法登录.最后我发现了这一点(上面代码中的第9行需要更改)
$cfg['Servers'][$i]['AllowNoPassword'] = true; <--- change this
$cfg['Servers'][$i]['AllowNoPassword'] = false; <--- to this fixed the problem.
Run Code Online (Sandbox Code Playgroud)
注意:localhost中还有其他区域需要手动更改密码.例如在"CD Collection"示例中.密码是硬编码的,而不是从config.inc.php中获取密码.
我也遇到了同样的问题,因为另一个mysql服务正在运行,并且在xampp中并行mysql我试图运行.因此,如果其他解决方案无效,您可以检查一下.您可以通过以下命令停止它:
sudo service mysql stop
Run Code Online (Sandbox Code Playgroud)
可能会帮助很少用户.
小智 5
**Step1**: Go to xampp/phpMyAdmin/config.inc.php
**Step2**: Search this: $cfg['Servers'][$i]['host'] = '127.0.0.1';
**Step3**: Replace with $cfg['Servers'][$i]['host'] = '127.0.0.1:3307';
Here 3307 will be change with your mysql port number, in my case it is 3307. Most of the times it will be 3306.
You can check your mysql port number from here : xampp/mysql/bin/my.ini
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
194386 次 |
| 最近记录: |