Linux – Installing phptheadmin package ERROR 1045 (28000)

linuxMySQLpackagesphpmyadminUbuntu

I need to create a new mySQL db for a local site, I thought I'd do that with phpMyAdmin so I installed that package like so:

sudo apt-get install phpmyadmin

During this process I get a couple of prompts and one of them is:

The phpmyadmin package must have a database installed and configured before it can be used.
This can be optionally handled with dbconfig-common.

I decide to go with the dbconfig-common.

I'm then asked to provide the password for administrative account to create the MySQL db/user:

Password of the database's administrative user:

Is this the sudo password? I assumed I was setting a password, so I write my new password.

An error occurred while installing the database:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

After I get this error, I'm offered to retry and i do that with various passwords, whatever I choose puts me back to this prompt.

The research I've made doesn't explain what is expected here but rather suggests to revise config files. Any ideas?


  • OS: Ubuntu 13.10
  • MySQL: 5.5.35-0ubuntu0.13.10.1 (Ubuntu)

Best Answer

The Password of the database's administrative user is NOT the root password. You may don't have MySQL installed. Try:

sudo apt-get install mysql-server mysql-client

You'll be asked for a password. This is the password that you'll have to use.

Then, re-install phpmyadmin.