How to fix mysql - mysql server depends on mysql community server 5.7 when installing on Ubuntu 20.4

preview_player
Показать описание
I got an error when trying to install mysql 5.7 on ubuntu 20.4 :

dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-community-server (= 5.7.37-1ubuntu18.04); however:
Package mysql-community-server 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 man-db (2.9.1-1) ...
Processing triggers for systemd (245.4-4ubuntu3.15) ...
Errors were encountered while processing:
mysql-community-server
mysql-server

How to fix this?
Run this to remove current existing mysql (mysql 8):

apt-get remove mysql-client mysql-common mysql-community-client mysql-community-server mysql-server
apt-get purge mysql-client mysql-common mysql-community-client mysql-community-server mysql-server

then install mysql again :
sudo apt install -f mysql-client=5.7* mysql-community-server=5.7* mysql-server=5.7*
Рекомендации по теме
Комментарии
Автор

works without a problem thank you so much bro

norahjustine
Автор

works 100%, thank you, danke, gracie, takk, on every language :)

djd
Автор

i tried this command: apt-get remove --purge mysql-serve and it announced: E: Sub-process dpkg --set-selections returned an error code (100). It's so boring

kitchenhacks
Автор

in last install was errors Can't read dir of '/etc/mysql/conf.d/'
I do next: sudo mkdir /etc/mysql/conf.d and retry instal - all wokrs good. thx for help

zzzvitzzz
Автор

Hi bro i have same error but did not work can you please help me on that

dasinagaraju