I have intalled phpmyadmin
recently in my system. Now I lost its username and password. I tried the below methods for login.
in etc/phpmyadmin/config.inc.php
I activated the AllowNoPassword
$cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
This question is related to
mysql
phpmyadmin
Try opening config-db.php, it's inside /etc/phpmyadmin. In my case, the user was phpmyadmin, and my password was correct. Maybe your problem is that you're using the usual 'root' username, and your password could be correct.
Try changing the following lines with new values
$cfg['Servers'][$i]['user'] = 'NEW_USERNAME';
$cfg['Servers'][$i]['password'] = 'NEW_PASSWORD';
Updated due to the absence of the above lines in the config file
Stop the MySQL server
sudo service mysql stop
Start mysqld
sudo mysqld --skip-grant-tables &
Login to MySQL as root
mysql -u root mysql
Change MYSECRET with your new root password
UPDATE user SET Password=PASSWORD('MYSECRET') WHERE User='root'; FLUSH PRIVILEGES; exit;
Kill mysqld
sudo pkill mysqld
Start mysql
sudo service mysql start
Login to phpmyadmin as root with your new password
If you don't remember your password, then run this command in the Shell:
mysqladmin.exe -u root password NewPassword
where 'NewPassword' is your new password.
Step 1:
Locate phpMyAdmin installation path.
Step 2:
Open phpMyAdmin>config.inc.php in your favourite text editor.
Step 3:
$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'] = '';
I had a problem with this. I didn't even create any passwords so I was confused. I googled it and I found out that I should just write root as username and than click GO. I hope it helps.
Source: Stackoverflow.com