16.04 upgrade broke mysql-server - Ask Ubuntu
my overall upgrade went well, left critically lingering issue of mysql-server not being able install itself, , nothing trying gets work.
this error see when trying install/reinstall it:
setting mysql-server-5.7 (5.7.11-0ubuntu6) ... job mysql.service failed because control process exited error code. see "systemctl status mysql.service" , "journalctl -xe" details. invoke-rc.d: initscript mysql, action "start" failed. dpkg: error processing package mysql-server-5.7 (--configure): subprocess installed post-installation script 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 not configured yet. dpkg: error processing package mysql-server (--configure): dependency problems - leaving unconfigured no apport report written because error message indicates followup error previous failure. processing triggers systemd (229-4ubuntu4) ... processing triggers ureadahead (0.100.0-19) ... errors encountered while processing: mysql-server-5.7 mysql-server e: sub-process /usr/bin/dpkg returned error code (1)
i've tried removing it, though doing attempts install mariadb because of dependencies (?). suggestions on can fix welcome.
edit: looks i'm not one: https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1573279
the instructions @andrew-beerman posted on right track, though aren't quite clear me , seem recommend more necessary. pieced answer above , helpful post in bug thread.
these steps took correct this:
back
my.cnf file
in/etc/mysql
, remove or rename itsudo mv /etc/mysql/my.cnf /etc/mysql/my.cnf.bak
remove folder
/etc/mysql/mysql.conf.d/
usingsudo rm -r /etc/mysql/mysql.conf.d/
verify don't have
my.cnf
file stashed somewhere else (i did in home dir!) or in/etc/alternatives/my.cnf
usesudo find / -name my.cnf
backup , remove
/etc/mysql/debian.cnf
files (not sure if needed, in case)sudo mv /etc/mysql/debian.cnf /etc/mysql/debian.cnf.bak sudo apt purge mysql-server mysql-server-5.7 mysql-server-core-5.7 sudo apt install mysql-server
in case syslog shows error "mysqld: can't read dir of '/etc/mysql/conf.d/'" create symbolic link:
sudo ln -s /etc/mysql/mysql.conf.d /etc/mysql/conf.d
then service should able start
sudo service mysql start
.
that got working!
Comments
Post a Comment