My MySql is not working. When I want to reinstall MySql on linux server the I it shows following message.
sudo apt install mysql-server mysql-client --fix-broken
Reading package lists... Done Building dependency tree Reading state information... Done E: The package mysql-server-5.7 needs to be reinstalled, but I can't find an archive for it.
sudo dpkg --remove --force-all mysql-server-5.7
If that doesn’t work,
sudo vim /var/lib/dpkg/status
You can do this with any text editor.
After you open that find the section about mysql-server-5.7. Delete the section with the information pertaining to it and save the file. Make sure you do a backup of the status file before you do this.
Reinstall your package using
Answered By – BinaryGandalf