MySQL remove/instal error


#1

Running this

ee stack remove --mysql ee stack install --mysql

on EasyEngine v3.7.4 and Debian Jessie reutrns error:

Unpacking mariadb-server (10.1.21+maria-1~jessie) ...
Selecting previously unselected package percona-toolkit.
Preparing to unpack .../percona-toolkit_2.2.11-1~dfsg1_all.deb ...
Unpacking percona-toolkit (2.2.11-1~dfsg1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Errors were encountered while processing:
 /var/cache/apt/archives/mariadb-server-10.1_10.1.21+maria-1~jessie_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
2017-02-21 17:52:45,355 (INFO) ee : Oops Something went wrong!!
2017-02-21 17:52:45,356 (ERROR) ee : Check logs for reason `tail /var/log/ee/ee.log` & Try Again!!!

apt-get -f install:

Preparing to unpack .../mariadb-server-10.1_10.1.21+maria-1~jessie_amd64.deb ...
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
invoke-rc.d returned 5
There is a MySQL server running, but we failed in our attempts to stop it.
Stop it yourself and try again!
dpkg: error processing archive /var/cache/apt/archives/mariadb-server-10.1_10.1.21+maria-1~jessie_amd64.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/mariadb-server-10.1_10.1.21+maria-1~jessie_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

#2

Your getting the error because the service is still running… Stop it and try again.

on Debian 8…

service mysql stop

#3

I tried to stop:

Failed to stop mysql.service: Unit mysql.service not loaded.

There is a process ps -ef |grep mysql\* that I tried to with kill -9. However, no result.


#4