问题描述
因此,在过去的一个小时中,由于无法登录PHPMyAdmin,我一直在尝试找出如何为MySQL重置"root"密码的方法.我尝试过更改config.inc.php文件中的密码并搜索其他方法.我找不到成功的方法.几个月前,我将其更改为测试密码,但现在我忘记了密码.如果有人可以帮助,那就太好了. (我在Windows计算机上运行).
So for the past hour I've been trying to figure out how to reset my 'root' password for MySQL as I cannot log into PHPMyAdmin. I've tried changing the password in the config.inc.php file and searching through other methods. I cannot find a successful way. A few months ago I changed it as a test password but now I forget what it was. If anyone can help, that would be great. (I'm running on a Windows computer).
推荐答案
您要编辑此文件:"\xampp\phpMyAdmin\config.inc.php"
更改此行:
$cfg['Servers'][$i]['password'] = 'WhateverPassword';
输入您的密码.如果您忘记了密码,请在命令行管理程序中运行以下命令:
to whatever your password is. If you don't remember your password, then run this command within the Shell:
mysqladmin.exe -u root password WhateverPassword
其中WhateverPassword是您的新密码.
where WhateverPassword is your new password.
这篇关于在Localhost上使用XAMPP重置MySQL根密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!