How to fix phpMyAdmin “Login without a password is forbidden by configuration” error?

In phpmyadmin on 1~3 minutes Post a comment

This is a security measure implemented by phpMyAdmin to block blank password logins. But we can easily disable it by changing the configuration file of phpMyAdmin. Enter the following command in the terminal, it will open the configuration file of phpMyAdmin with a terminal-based text editor, called Nano.

sudo nano /etc/phpmyadmin/

Then, press Ctrl + w. Search for “AllowNoPassword” (without quotes). Then the cursor will be on the required line, uncomment that line by removing the // of that line. Now that line should be like this.

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

Press Ctrl + o and press the enter key to save the phpMyAdmin configuration file. Then press Ctrl + x to exit from the Nano text editor.

Go http://localhost/phpmyadmin and try again to log in. Perhaps, still, you might not be able to log in due to the default MySQL Unix Socket based authentication. You might get a new error called “mysqli_real_connect(): (HY000/1698): Access denied for user ‘root’@’localhost’. Under such a case, read how to fix mysqli_real_connect(): (HY000/1698): Access denied for user ‘root’@’localhost’ error which explains how to fix it.