9

After the update, mysql/phpmyadmin stopped working. When I do:

sudo dpkg-reconfigure phpmyadmin

I get this error:

An error occurred while installing the database:                            
 │                                                                             
 │ mysql: [Warning] mysql: Empty value for 'port' specified. Will throw an     
 │ error in future versions ERROR 1045 (28000): Access denied for user         
 │ 'root'@'localhost' (using password: YES) .

The way I see it, I need to specify the port in some config file but I don't know where?

8

My machine configuration - Ubuntu 16.04 - MySql 5.7.13 - PHP 7.0.8 - Apache 2.4.18

Edit the file /etc/dbconfig-common/phpmyadmin.conf, changing

dbc_dbport='' to dbc_dbport='0'

After edit the file and save it, if you are still on the dbconfig-common wizard select retry, if not run sudo dpkg-reconfigure phpmyadmin (choose Yes when ask you if you want to Reinstall database for phpmyadmin), and continue normally without change any value, if you want change some value, do it in the file that you edit before.

When configuration window asks what you want to do with existing configuration file, choose Keep the local version currently installed.

In this point you can check the differences and only must exist the ones that you made in the file.

  • it works for me. – Sruj Sep 4 '16 at 19:09
  • 2
    After trying this, I get: mysql said: ERROR 1045 (28000): Access denied for user 'phpmyadmin'@'localhost' (using password: YES) -- Tried with both random password and madeup one. Had to finally 'apt purge phpmyadmin' and run 'apt autoremove' on dbconfig etc. Then reinstall using defaults/random password. Worked. No dbcport change needed. This error occurred for me after a do-release-upgrade 14>16 – bshea Oct 27 '17 at 20:01
2

Following a do-release-upgrade (14 to 16), I had the same issue.
I had to do the following:

Remove and clean out installation as much as possible:

sudo apt remove phpmyadmin && sudo apt purge phpmyadmin

Removing phpmyadmin should have left orphaned packages on most systems - remove them.
Specifically: 'dbconfig-common' & 'dbconfig-mysql':

sudo apt autoremove

Now you need to install it all again - (use defaults/hit enter):

sudo apt install phpmyadmin

I could immediately login to the phpmyadmin local web page. Working again.
Note: apt-get may be used in place of apt above.
Note: dbc_dbport='' was unchanged. I didn't touch it as per other answer.

  • Also remember to do database deconf when prompted. – Mehraban Dec 9 '17 at 19:37
1

https://bugs.launchpad.net/ubuntu/+source/mariadb-10.0/+bug/1447808/comments/6

You could succeed your installation by choosing mysql-user root instead of phpmyadmin and debian-sys-maint

After this you need to create mysql-user like root

CREATE USER 'admin'@'localhost' IDENTIFIED BY 'password';
GRANT ALL ON *.* TO 'admin'@'localhost';

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.