Can't get mysql/phpmyadmin to work after updating to 16.04
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?
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.
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.
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';