Knowledge Base Hub

Browse through our helpful how-to guides to get the fastest solutions to your technical issues.

Home  >  phpMyAdmin  >  How to Solve the “Password is Forbidden” phpMyAdmin Login Error?
Top Scroll

How to Solve the “Password is Forbidden” phpMyAdmin Login Error?

 2 min

On a development server, at least once this situation occurs when the MySQL won’t set up with a root password.

Preflight Check

  • Login without a password is not allowed by configuration (see AllowNoPassword).
  • Here we will be using Ubuntu 15.04 server, and logged in as root.

The Error

You will get an error as “Login without a password is forbidden by configuration (see AllowNoPassword)” as shown below:

The Solution

You can easily enable the ability to manage MySQL via phpMyAdmin (when the root login has no password). It is as easy as changing two lines in the configuration file.

Let’s set the AllowNoPassword variable, included in phpMyAdmin’s configuration file, to TRUE. On an Ubuntu 18.04 LTS server, modify the below file:

vim /etc/phpmyadmin/config.inc.php

Type in a forward slash “/” to start searching of the file. Type in “Allow” which will display the below line:

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

Now, uncomment that line. For this, just remove the two forward slashes “//” at the start of the line. Also note that there are two instances of this line in the configuration file.

Ensure that you uncomment both!

Next, exit and save the file with the below command:

:wq

Conclusion

After making this change, and later re-adding a password to phpMyAdmin, you can any time go back in and re-comment these lines if you want to disable this setting. You can easily modify configuration settings like these to behave in the way you want because Linux addresses almost all files as flat files.

For our Knowledge Base visitors only
Get 10% OFF on Hosting
Special Offer!
30
MINS
59
SECS
Claim the discount before it’s too late. Use the coupon code:
STORYSAVER
Note: Copy the coupon code and apply it on checkout.