10

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
Gopal Joshi
  • 2,350
  • 22
  • 49
Ben Pearce
  • 6,884
  • 18
  • 70
  • 127
  • Maybe this will be helpful for you: http://stackoverflow.com/questions/4124447/reset-root-password-with-wrong-mysql-config – rMX May 12 '13 at 20:00
  • Thanks RXM unfortunately this is one of the tutorials I already attempted. – Ben Pearce May 12 '13 at 20:09
  • Found this: https://forums.digitalpoint.com/threads/how-to-change-the-password-for-phpmyadmin.518972/ is it of any help ? – Marcello Romani May 13 '13 at 18:27
  • If you have checked save password to notepad then the text file with password will generated into mysql directory. it can help you. – Gopal Joshi Dec 27 '13 at 07:05

9 Answers9

37

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.

Ricardo Parker
  • 809
  • 1
  • 9
  • 10
  • 1
    sudo /Applications/XAMPP/xamppfiles/bin/mysqladmin -u root password root /Applications/XAMPP/xamppfiles/bin/mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: NO)' – arvindwill Apr 14 '16 at 17:37
15

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.

godot
  • 3,422
  • 6
  • 25
  • 42
Nedshed
  • 151
  • 1
  • 3
3

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

Community
  • 1
  • 1
vlev
  • 31
  • 1
  • 3
0

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;

0

The only solution worked for me:

(source: https://stackoverflow.com/a/22784404/2377343 )

You need to stop Mysql and change user password using Commands.

Community
  • 1
  • 1
T.Todua
  • 53,146
  • 19
  • 236
  • 237
0

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 ~]#

0

This is what helped me:

Wherever you have installed XAMPP open PhpMyAdmin Folder,( In my case C:\xampp\phpMyAdmin).

There you find a file named config.php, open it with notepad or any editor.

You find user and password for phpMyAdmin like this.

/* Authentication type and info */
$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'] = '';
Muneeb
  • 11
  • 1
-4

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/

-15

Reinstalling the software fixes the issue, just make sure not to delete the htdocs folder in the process.