问题
I have a local host running on XAMPP on a Mac. At some point I set a password in phpMyAdmin which I've ow forgotten. Can anyone help me get back into phpMyAdmin? I've followed a ton of tutorials but they all either don't work or refer to some file that doesn't seem to be on my computer. Is there an easy way?
When I try to open:
http://localhost
I get:
The Server http://localhost:80 requires a username and password
回答1:
Reinstalling the software fixes the issue, just make sure not to delete the htdocs folder in the process.
回答2:
You want to edit this file: "\xampp\phpMyAdmin\config.inc.php"
change this line:
$cfg['Servers'][$i]['password'] = 'WhateverPassword';
to whatever your password is. If you don't remember your password, then run this command in the Shell:
mysqladmin.exe -u root password WhateverPassword
where 'WhateverPassword' is your new password.
回答3:
There is a batch file called resetroot.bat
located in the xammp folders 'C:\xampp\mysql' run this and it will delete the phpmyadmin
passwords. Then all you need to do is start the MySQL
service in xamp
and click the admin button.
回答4:
The question may be getting old, but I've struggled with the same issue just now.
After deleting passwords with resetroot.bat
, as instructed by Nedshed, you can choose another password by going to http://localhost/security/index.php
回答5:
The best thing is to go to your phpmyadmin folder and open config.inc.php and change allownopassword=false to $cfg['Servers'][$i]['AllowNoPassword'] = true;
回答6:
The only solution worked for me:
(source: https://stackoverflow.com/a/22784404/2377343 )
You need to stop Mysql and change user password using Commands.
回答7:
Hi this worked for me "/opt/lampp/xampp security" in Centos
[root@XXXXX ~]# /opt/lampp/xampp security
XAMPP: Quick security check...
XAMPP: Your XAMPP pages are secured by a password.
XAMPP: Do you want to change the password anyway? [no] yes
XAMPP: Password:
XAMPP: Password (again):
XAMPP: Password protection active. Please use 'xampp' as user name!
XAMPP: MySQL is not accessable via network. Good.
XAMPP: MySQL has a root passwort set. Fine! :)
XAMPP: The FTP password for user 'daemon' is still set to 'xampp'.
XAMPP: Do you want to change the password? [yes]
XAMPP: Password:
XAMPP: Password (again):
XAMPP: Reload ProFTPD...ok.
XAMPP: Done.
[root@XXXXX ~]#
回答8:
Unless you have changed your password the default setting dont require you to enter a password to connect to the MYSQL server, try:
mysql_connect('localhost','root','');
if not then you can export your databases to a external file, just follow these instructions.
http://dev.mysql.com/doc/refman/5.0/en/innodb-backup.html
if you are unable to access phpMyAdmin then try,
http://www.simplehelp.net/2008/11/26/how-to-reset-a-lost-mysql-root-password/
来源:https://stackoverflow.com/questions/16511444/how-to-get-back-lost-phpmyadmin-password-xampp