Knowledge Base
MilesWeb / phpMyAdmin

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

Approx. read time : 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:

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

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:

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.

Avatar
Pallavi is a Digital Marketing Executive at MilesWeb and has an experience of over 4 years in content development. She is interested in writing engaging content on business, technology, web hosting and other topics related to information technology.