1

I have been trying to install phpmyadmin on my Debian 9 (stretch) system, I already have apache, php and mysql installed and working. When I run

sudo apt-get install phpmyadmin

it downloads but the installation throws this error:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

even though I know I have a password for mysql. Is there a way I can force phpmyadmin to use a password when logging into mysql??

1

Configure/create a /root/.my.cnf file and put the following contents:

[client]
user=root
password=yourPasswordHere

Then re-run the installation process. The issue is that phpmyadmin is attempting to log in to your mysql server and you have not provided a username/password to the phpmyadmin install script. Check the PMA documentation on where to configure this in PMA's config file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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