How to get phpmyadmin username and password

I recently included phpmyadmin

in my system. Now I have lost my username and password. I tried the following login methods.

in etc/phpmyadmin/config.inc.php

I have activated AllowNoPassword

$ cfg ['Servers'] [$ i] ['AllowNoPassword'] = TRUE;

+3


source to share


5 answers


 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'] = '';

      



+3


source


Try changing the following lines with new values

$cfg['Servers'][$i]['user'] = 'NEW_USERNAME';
$cfg['Servers'][$i]['password'] = 'NEW_PASSWORD';

      

Updated for missing specified lines in config file

Stop MySQL Server

sudo service mysql stop

      

Start mysqld

sudo mysqld --skip-grant-tables &

      

Login to MySQL as root



mysql -u root mysql

      

Change MYSECRET to the 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 new password

+1


source


Try opening config-db.php, inside / etc / phpmyadmin. In my case the user was phpmyadmin and my password was correct. Perhaps your problem is that you are using the normal root username and your password might be correct.

+1


source


If you don't remember your password, run this command in a shell:

mysqladmin.exe -u root password NewPassword

where "NewPassword" is your new password.

0


source


I had a problem with this. I didn't even create passwords, so I was confused. I googled this and I found out that I should just write root as username and then press GO. Hope this helps.

-1


source







All Articles