13

Firstly, please do not link me to any of these posts as I have already read them in their entirety and nothing helped:

I keep getting the above error (in the title) when setting up or reconfiguring PHPMyAdmin on Ubuntu Server 20.04.

To be clear, this is the the terminal view when entering the password that prompts the error

enter image description here

And now the error itself

enter image description here


Here is the result when I run the following command:

SHOW VARIABLES LIKE 'validate_password%';

enter image description here

I enter the following password (obviously fake but still meets the password requirements above): JoeBloggs2018$

For my own sanity, a breakdown of the password:

  • Length: 14 Chars
  • Uppercase Count: 2 (Mixed Case = true)
  • Number Count: 4
  • Special Char Count: 1

This then results in the error which I do not understand. I didn't want to lower the password requirements however I did just for troubleshooting purposes and it still didn't work.

If anyone could help I would greatly appreciate it.

jacc_01
  • 310
  • 1
  • 2
  • 10

3 Answers3

28

I had the same problem with my students. We fixed this by creating the phpmyadmin user before installing phpmyadmin:

CREATE USER 'phpmyadmin'@'localhost' IDENTIFIED WITH 'caching_sha2_password' BY 'Phpmy@dm1n';
GRANT ALL PRIVILEGES ON phpmyadmin.* TO 'phpmyadmin'@'localhost' WITH GRANT OPTION;

Then:

sudo apt install phpmyadmin

When prompted for the password, enter the password provided when creating the user (Phpmy@dm1n).

Black
  • 18,150
  • 39
  • 158
  • 271
Lluís Delgado
  • 296
  • 3
  • 3
3

I found another solution here.

  1. Select 'abort'
  2. sudo mysql -p
  3. mysql> UNINSTALL COMPONENT "file://component_validate_password";
  4. mysql> exit
  5. sudo apt install phpmyadmin
  6. mysql> INSTALL COMPONENT "file://component_validate_password";
Black
  • 18,150
  • 39
  • 158
  • 271
0

If you don’t have a bunch of user accounts connecting to your database server, then you may be able to get away with one of the two following options:

Option 1 — Change the Password Policy

Your password policy is currently set to MEDIUM. You can easily change this to LOW in order to handle easily-cracked passwords. In MySQL, as root (or an equivalent), execute this statement:

SET GLOBAL validate_password.policy=LOW;

Option 2 — Remove the Password Validation Module

This is very much a Rod-from-God approach, but it gets the job done for local environments:

  1. Connect to the server as root
  2. Remove the plug-in:
    UNINSTALL PLUGIN validate_password;
    
    In the event of an error, use:
    UNINSTALL COMPONENT 'file://component_validate_password';
    
  3. Get on with your work

These solutions are not recommended for a production or Internet-accessible instance. Please don’t expose yourself to unnecessary risk.

matigo
  • 1,321
  • 1
  • 6
  • 16
  • Thanks for the response. I actually already tried option 1 as mentioned however that didn't work. Option 2 I was uncomfortable with doing for the reasons you stated. I'll keep looking but it looks like it's isolated somewhat to the PHPMyAdmin setup process and if you disable the `validate_password` plugin only temporarily and then install it again, you password is both accepted and secure - I'll add an answer once I get conclusive information. – jacc_01 May 18 '21 at 14:52
  • @matigo - Good to know, but this doesn't answer the question. His password appears strong enough, but mysql/phpmyadmin setup script rejects it. Why? – B. Shea Oct 01 '21 at 17:17