1

can anyone help I was installing PHPMyAdmin on my digitalocean WordPress server by using the command sudo apt update && sudo apt install phpmyadmin php-mbstring then I choose apache and did yes yes then I got this error :- Error

then I tried so many things but can't solve it I have seen some other StackOverflow thread access denied for user debian-sys-maint tried all nothing worked can anybody please help me m new

1
  • Did you find a solution? same problem here.
    – Tony
    Commented Dec 13, 2021 at 16:25

1 Answer 1

0

I had the same problem after upgrading my version of Linux Mint. The upgrade uninstalled phpmyadmin and when I reinstalled it I got the same error.

I eventually figured out it was a password mismatch between what was in the config file and what the database user was using. This is how I fixed it:

Find the password in the config file:

sudo cat /etc/mysql/debian.cnf

You will see something like:

user = debian-sys-maint
password = QOLla97eGTZmNWVp

Once you get the password, change it in the database, then restart mysql:

$ mysql -u root -p
$ (enter root password)
mysql> ALTER USER 'debian-sys-maint'@'localhost' IDENTIFIED BY 'QOLla97eGTZmNWVp';
mysql> FLUSH PRIVILEGES;
mysql> exit;
$ sudo /etc/init.d/mysql restart

After this my phpmyadmin installs successfully. Hope this helps someone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.