PDA

View Full Version : 18.04 to 20.04 Upgrade - Why can't I decide if mariadb replaces mysql?



tobiz
November 29th, 2020, 05:26 PM
I've been successfully running mythtv V30 under 18.04 for some time and decided to upgrade to mythtv V31 and 20.04. It seems the 20.04 upgrade decides to replace mysql with mariadb, result - a mess!!! I want to continue using mysql (I understand there are some issues with mythtv and mariadb anyway). I've been using mysql and its tools (eg mysql workbench) for some time and want to continue using it (esp with mythtv). Trying to de-install mariadb and installing mysql-8.0 resulted (after several days) in the situation where mysql-server-8.0 wouldn't install because the mysql preinstall script tries to stop the mysql.service but since it didn't install correctly couldn't be stopped, result apt-get failed "completely" even after setting "turn errors to warnings". Why am I being forced to have mariadb?

Is there a "safe" way to de-install mariadb (after upgrading to 20.04) such that mysql V8.0 can be installed and function correctly?

The last thing I want to do is a clean 20.04 install, to do so would waste months of setup of mythtv (zfs file systems etc); I don't mind loosing the mthtv database, it's all the other s/w setup I want to keep (and be updated as required)

(I've recovered the situation by going back to an old dpkg.status file, I can now at least install packages!)

Tadaen_Sylvermane
November 30th, 2020, 12:31 PM
I'm curious what issues you speak of between Mythtv & Mariadb. I've been running it just fine for a few years.

I'm assuming you have database backups. If so then it should be as easy as purging mariadb-server & installing mysql-server. Import backups and enjoy.

tobiz
November 30th, 2020, 04:04 PM
Thanks for the info. I've been running mythtv with mysql since 2008 (not the installation at issue); I know mysql and its tools and see no reason to learn another. In numerous google searches to find a way out of my problem I know a mythtv & mariadb issue web page passed me by but I didn't follow it up since it wasn't helping solve my problem. I don't have a db backup as I was prepared to abandon it and start again. I tried the upgrade to 20.04 which updated mythtv to V31 but when I found the mythbackend wouldn't start because it couldn't connect to a database that's when I found mariadb had been installed and not mysql updated to 8.0. Trying to solve that resulted in all the problems. I probably tried to install mysql-8.0 before purging mariadb not thinking there should be any dependencies between the two. After that my attempts at solving the problems probably made things worse. I will try your suggestion, but still don't understand how an upgrade to a later version of ubuntu can decide to replace one db system with another without offering it as an option, neither do I understand how the install script for mysql can fail if it can't stop the mysql server service; it should do something like "The mysql.service can't be stopped. Do you wish to continue? y/N". If this had been the situation I wouldn't be posting on this forum.

Tadaen_Sylvermane
November 30th, 2020, 04:39 PM
They are mutually exclusive. Drop in replacement for each other is why can't have both.