I tried to remove the mysql-server but i got this problem
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 111 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 239230 files and directories currently installed.)
Removing mysql-server (8.0.21-0ubuntu0.20.04.4) ...
Setting up mysql-server-8.0 (8.0.21-0ubuntu0.20.04.4) ...
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
update-alternatives: error: alternative path /etc/mysql/mysql.cnf doesn't exist
dpkg: error processing package mysql-server-8.0 (--configure):
installed mysql-server-8.0 package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
mysql-server-8.0
E: Sub-process /usr/bin/dpkg returned an error code (1)
and when i tried to install i got problem like this
firdausyah22@lenovo110:~$ sudo apt install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libfprint-2-tod1
Use 'sudo apt autoremove' to remove it.
The following NEW packages will be installed:
mysql-server
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/9.552 B of archives.
After this operation, 111 kB of additional disk space will be used.
Selecting previously unselected package mysql-server.
(Reading database ... 239228 files and directories currently installed.)
Preparing to unpack .../mysql-server_8.0.21-0ubuntu0.20.04.4_all.deb ...
Unpacking mysql-server (8.0.21-0ubuntu0.20.04.4) ...
Setting up mysql-server-8.0 (8.0.21-0ubuntu0.20.04.4) ...
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
update-alternatives: error: alternative path /etc/mysql/mysql.cnf doesn't exist
dpkg: error processing package mysql-server-8.0 (--configure):
installed mysql-server-8.0 package post-installation script subprocess returned error exit status 2
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-8.0; however:
Package mysql-server-8.0 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.
Errors were encountered while processing:
mysql-server-8.0
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
previously I used XAMPP. I have removed XAMPP because I will use Nginx as a webserver, but I have a problem with MYSQL
how to solve this problem?
apt
. – Kulfy Aug 19 '20 at 11:53