Removed the MySQL database

Okay, here is the issue, I’ll keep it as concise as possible:
I have a raspberry pi 3 running OSMC. On this Raspberry I installed Spotweb, which required a MySQL database. Somehow this database crashed, and I decided to remove and reinstall the MySQL server. This was not a great idea, as I quickly saw that OSMC was also dependant on that same MySQL server… So now my OSMC won’t boot, it crashes, of course, because it can’t read from the database.

My question: is there a possibility to all fix this without completely reinstalling? I’ve got programs like Sonarr and Couchpotato configured now (took me some effort), so I would like to leave those in place while fixing OSMC.

mv .kodi .kodi_backup

But if you depend on mysql means you had a quite special configuration

Try

mv ~/.kodi/userdata/advancedsettings.xml advancedsettings.bak

@fzinken, thanks but now kodi won’t start. It remains at the blue boot screen.

@ActionA, that file doesn’t exist…

I ran the command:

sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-5.5 mysql-client-core-5.5

Followed by autoremove, which gave me:

osmc@osmc:~/.kodi/userdata$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 rbp2-device-osmc : Depends: rbp2-mediacenter-osmc but it is not installed
E: Unmet dependencies. Try using -f.

I starting to think I really bricked it, and that it is easier to reinstall :sweat:

Did you run sudo apt-get -f install? Further, please provide logs.

Then you weren’t using MySQL in relation to Kodi. I’m not sure why removal would prevent Kodi from starting in this case.

The answer to part of your question is i the block of text you quote. Run sudo apt-get install -f

The file @ActionA asked you to move won’t be there because you already moved the whole directory it was in.

Try:

cd ~
mv .kodi_backup .kodi
mv ~/.kodi/userdata/advancedsettings.xml advancedsettings.bak
sudo reboot

That should make kodi boot from the internal databasae rather than depend on MySQL.

If noneof that works post a full set of logs so we can see what is trying to access MySQL.

Ah indeed! Brain fart for me! lol

No the file wasn’t there. Not because I moved the whole directory. I first tried your solution, than actiona’s solution. Both didn’t work. The force apt-get install didn’t work either.

I just decided to reinstall the whole SD card. Thanks for the help!