mySQL server refused to be installed on Ubuntu 18.04

mySQL server refused to be installed on Ubuntu 18.04
0

Guys sorry for the harsh tone I am just simply want to solve this issue asap.

steps I took:

sudo apt-get update
sudo apt-get install mysql-server

errors I got :

Setting up mysql-server-5.7 (5.7.29-0ubuntu0.18.04.1) ...
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Renaming removed key_buffer and myisam-recover options (if present)
dpkg: error processing package mysql-server-5.7 (--configure):
 installed mysql-server-5.7 package post-installation script subprocess returned error exit status 1
No apport report written because the error message indicates its a followup error from a previous failure.
                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
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for systemd (237-3ubuntu10.39) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ureadahead (0.100.0-21) ...
Errors were encountered while processing:
 mysql-server-5.7
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

I did a simple google search about the main error :

E: Sub-process /usr/bin/dpkg returned an error code (1)

web site I went to : https://itsfoss.com/dpkg-returned-an-error-code-1/

it tells me there are a few ways to do a work around :

I tried them all but they all did not work.

On stackoverflow I saw this so I gave it a try: https://stackoverflow.com/questions/58961079/mysql-server-5-7-is-not-configured-yet

sudo apt purge mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server-5.7 mysql-server-core-5.7 mysql-server


sudo apt update && sudo apt dist-upgrade && sudo apt autoremove && sudo apt -f install


sudo apt install mysql-server

Still gives me the same error.

What steps should I take now.

is it because I installed XAMPP before SQL server???

also another thing is I am doing all these because I got this error when trying to setup OctoberCMS:

I thought XAMPP comes with mySQL.

yes it does… but it keeps giving me the error above…
so I thought it was bceasue I did not install mySQL server + mySQL client on my machine…

Welcome to the world of Linux lol. Best thing to do if it doesn’t work try finding an alternative :3

1 Like

Gavin Belson: “Fuck!”

I did came across this problem too one time like that and the way i solved it is by removing all files and folders related to mysql using this command below which i got from the link below the commands and it did work for me. Try and lets see if it will work for you too…

sudo apt-get  **remove**  -- **purge mysql** *
sudo apt-get  **purge mysql** *
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get  **remove**  dbconfig- **mysql** 
sudo apt-get dist-upgrade
sudo apt-get  **install mysql** - **server** 

this is the link that helped me out…

This is why you shouldn’t install stuff like XAMPP or any of those other prepackaged stacks on Linux – they’re usually packaged poorly and confuse the package manager at best and screw up your entire system at worst. Just install and configure them separately, which is something you’ll have to do in real world situations anyway.

hmmm lesson learnt… =.=

@chuckadams @charmming

I will set up a VM and try install in it see how it goes.

Have you resolve this problem? What is your operating system? I installed XAMP linux on my linux mint machine and it works with no problem.

Hey, thanks for the reply. And I haven’t been able to solve this issue unfortunately.
I fired up a VM (same OS, ubuntu 18.04) and tried some steps to install it right there, same error.

may I know that what is the version of your linux machine?