我运行XAMPP,几天前,我已经通过phpmyadmin设置了root密码的密码。我从那时起无法访问phpMyAdmin
我跟着这个链接的帮助,但一切似乎很好(在config.inc.php)。 我什至尝试unistalling xampp完全重新启动Windows,然后重新安装xampp,但仍然指向本地/ phpmyadmin我得到以下错误
MySQL said: Cannot connect: invalid settings. phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.
我也尝试通过MySQL的网站帮助给出的mysqld.bat重置根密码,但无济于事
请帮忙!
编辑config.inc.php文件。 您可以在“C:\ xampp \ phpmyadmin \”中find它并将〜行21:
$cfg['Servers'][$i]['password'] = ''; to $cfg['Servers'][$i]['password'] = 'yourPassHere';
保存并再次访问phpmyadmin。 这样可以避免您必须更改Maxwell所述的密码。
您可以使用–skip-grant-tables选项重置Mysql密码,然后使用root用户login,而无需input密码和问题
UPDATE user SET Password=PASSWORD('newpwd') WHERE User='root'; flush privileges; exit;
接下来,通常重新启动MySQL。
希望这可以帮助。
我find了一个修复程序。
转到这个目录C:\xampp\phpMyAdmin\config.inc.php并将以下值更改为适合您的值。
$cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['password'] = 'password'; // which is default setting in xampp server
我find了修复。 去config.inc.phpfind下面这行代码:
$cfg['Servers'][$i]['auth_type'] = 'config'; $cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['password'] = '123456'; $cfg['Servers'][$i]['extension'] = 'mysqli'; $cfg['Servers'][$i]['AllowNoPassword'] = false; $cfg['Lang'] = '';
如果允许没有密码是true使其为false 。 如果密码为空,请在出现错误消息之前input您之前从phpmyadmin仪表板中更改的密码值。