# apt purge mysql-server Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: mysql-client-5.7 mysql-common mysql-server-5.7 Use 'sudo apt autoremove' to remove them. The following packages will be REMOVED: mysql-server* 0 upgraded, 0 newly installed, 1 to remove and 5 not upgraded. 2 not fully installed or removed. After this operation, 177 kB disk space will be freed. Do you want to continue? [Y/n] Y (Reading database ... 98077 files and directories currently installed.) Removing mysql-server (5.7.19-0ubuntu0.17.04.1) ... Setting up mysql-server-5.7 (5.7.19-0ubuntu0.17.04.1) ... Renaming removed key_buffer and myisam-recover options (if present) Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details. invoke-rc.d: initscript mysql, action "start" failed. ● mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: activating (auto-restart) (Result: exit-code) since Fri 2017-09-08 16:35:54 EDT; 13ms ago Process: 26774 ExecStartPost=/usr/share/mysql/mysql-systemd-start post (code=exited, status=0/SUCCESS) Process: 26773 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE) Process: 26765 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS) Main PID: 26773 (code=exited, status=1/FAILURE) CPU: 296ms Sep 08 16:35:54 LKNServer-Ubuntu systemd[1]: Failed to start MySQL Community…er. Sep 08 16:35:54 LKNServer-Ubuntu systemd[1]: mysql.service: Unit entered fai…te. Sep 08 16:35:54 LKNServer-Ubuntu systemd[1]: mysql.service: Failed with resu…e'. Hint: Some lines were ellipsized, use -l to show in full. dpkg: error processing package mysql-server-5.7 (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: mysql-server-5.7 E: Sub-process /usr/bin/dpkg returned an error code (1)