Can't get mysql/phpmyadmin to work after updating to 16.04

20,150

Solution 1

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.

Solution 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.

Solution 3

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';
Share:
20,150

Related videos on Youtube

j4ck4ll
Author by

j4ck4ll

I am a CS student working on his diploma, developing a stock-trading application in Laravel, which I am still learning. Not a coding ninja, in fact I'm far from it but I'm learning every day and trying to keep it fun and positive. I know basic PHP, JS, jQuery, some C and C#, though I am master of none. And I'm addicted to roasted pumpkin seeds.

Updated on September 18, 2022

Comments

  • j4ck4ll
    j4ck4ll over 1 year

    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?

  • Sruj
    Sruj over 7 years
    it works for me.
  • B. Shea
    B. Shea over 6 years
    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
  • Mehraban
    Mehraban over 6 years
    Also remember to do database deconf when prompted.