5

I cannod install phpmyadmin. The installation process fails with the following error. I can normally log in to the mysql database. What should I do? Normally I would expect "(using password: Yes)". What is making apt to not to bother to give the password?. I am using Debian 9 installation that is pretty fresh and installed on a clean hard drive.

I have copied the innoDB storage from the previous installation and the database has imported these (together with the mysql database)

Additionally AFAIK "dpkg-reconfigure mysql-server" should ask for root password. In my case nothing happens - command quits after one second.

mysql error

  • did you try the solution from Kishor Ramanan on the following link? stackoverflow.com/questions/41645309/… – Tom Oct 26 '17 at 14:21
  • Its completely unrelated to my problem. As I said I can log in to the database. – Lacek Oct 26 '17 at 14:33
  • sorry then, I misunderstood your question (translation problem, in my country "normally" means "usually", sorry for my bad english) – Tom Oct 27 '17 at 8:33
4

I have figured it out.

Solution 1 The trick was: set "SET PASSWORD FOR root@localhost=PASSWORD('')" apparently dbconfig-common works only if the password is empty.

This is related to the contents of "/etc/mysql/debian.cnf" file which in my case had empty password set:

[client]
host     = localhost
user     = root
password =  
socket   = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host     = localhost
user     = root
password = 
socket   = /var/run/mysqld/mysqld.sock
basedir  = /usr

Solution 2

Put the password for the root user into /etc/mysql/debian.cnf

[client]
host     = localhost
user     = root
password = **** password here ***** 
socket   = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host     = localhost
user     = root
password = **** password here *****
socket   = /var/run/mysqld/mysqld.sock
basedir  = /usr

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.