Can't install phpMyAdmin on fresh Wordpress Droplet

I’m trying to follow these instructions to install phpMyAdmin:

But I get this error after trying to install phpMyAdmin using this command (second step from above):

sudo apt install phpmyadmin php-mbstring php-gettext

This is the error I get:

ERROR 1045 (28000): Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)

Any one know how to fix this? I have tried a few things that came up in Google, but no luck so far.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

This is happening every single time I use the marketplace image for WordPress with Ubuntu 20, tried tons of suggested solutions on internet and the one that did the trick was this:

Start mysql with root user and then:

mysql> GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' WITH GRANT OPTION;


mysql> EXIT

The part I was missing and didn’t see in other places was the WITH GRANT OPTION.

Hi there @neddytek,

I tried following the article as described and it seems like it works as expected.

Note that you need to also follow the mentioned prerequisites otherwise you might hit unexpected errors.

In my case I had to do the following:

I think that you would get the error in case that you have not run the sudo mysql_secure_installation command from the How to install LAMP tutorial.

Hope that this helps! Regards, Bobby