Create a root password for PHPMyAdmin

PHPMyAdmin is giving me a message saying that the user (root) does not have a password.

So, how can I create one?


Solution 1:

Open phpMyAdmin and select the SQL tab. Then type this command:

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('your_root_password');

Also change to this line in config.inc.php:

$cfg['Servers'][$i]['auth_type'] = 'cookie';

To make phpMyAdmin prompts for your MySQL username and password.

Solution 2:

To create root password in PHPMyAdmin in UI easy way, you can follow simple steps below:

  • Access phpMyAdmin with root account (no password) -> User accounts.

enter image description here

Click on root > Edit privileges

enter image description here

Then click on Change password

enter image description here

Enter your desired password -> Go

enter image description here

Logout and log-in again with new password

Solution 3:

Well, I believe that I've solved the password configuration 'issue' - WampServer 2.2 - Windows 7.

The three steps that I did:

  1. In the MySQL console set a new password. To make that: mysqladmin -u root password 'your_password'

  2. In phpMyAdmin click in users and set the same password to the user root.

  3. Finally, set your new password in the config.inc.php. Don't change anything else in this file.

This worked for me. Good luck!

Daniel

Solution 4:

PHPMyAdmin is telling you that your MySQL service is missing a root password. You can change it by accessing the MySQL command line interface. mysqladmin -u root password newpass

http://www.howtoforge.com/setting-changing-resetting-mysql-root-passwords

Solution 5:

On linux (debian 9) after resetting the mysql(Maria DB) root password, you just have to edit the phpmyadmin db config file located at /etc/phpmyadmin/config-db.php

gedit /etc/phpmyadmin/config-db.php (as root)