I installed a fresh copy of 18.04 am installing all the packages that are required. When installing mysql-server
and mysql-client
I receive the following error
dpkg: error processing package mysql-server-5.7 (--configure):
installed mysql-server-5.7 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.7; however:
Package mysql-server-5.7 is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for ureadahead (0.100.0-20) ...
Processing triggers for systemd (237-3ubuntu10) ...
Errors were encountered while processing:
mysql-server-5.7
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
I have tried the purge, autoremove, autoclean, dist-upgrade
routine but it does not work for me.
How do I fix this problem, please help
I solved this problem by going to Oracles mysql documentation on MySQL APT Repository which was a huge help, following all the instructions on the page allowed me to install
mysql
successfully.What I did:
mysql-apt-conf
tool from http://dev.mysql.com/downloads/repo/apt/sudo dpkg -i /PATH/version-specific-package-name.deb
MySQL Server & Cluster
to whatever you want by pressing enter and selecting one ofmysql-5.7
ormysql-8.0
then go toOk
and press entersudo apt-get update
(this step is required only for Ubuntu 17.10 or below)sudo apt install mysql-server
mysql_secure_installation
, this will configure the password and other security stuff for mysqlUpdate
If anyone ran or had to run mysql_secure_installation with
sudo
, please note that you might not be able to login into mysql unless you use sudo. When this happens login to mysql console created a new user for mysql then flush all privileges. Check this question right here Connect to mysql server without sudo