You said "This step is not necessary when upgrading to MariaDB 10.2.5 or later." and in my case, I was upgrading to mariadb-server 10.3.17, so I guess I should not need "set global innodb_fast_shutdown=0;"? Can someone reproduce the issue with Ubuntu 19.04 on VirtualBox?
On Wed, 16 Oct 2019 at 11:05, Gordan Bobic <gordan.bo...@gmail.com> wrote: > I'm not sure if you accidentally omitted it, but the part I was referring > to is documented here: > > https://mariadb.com/kb/en/library/upgrading-from-mariadb-101-to-mariadb-102/ > > Specifically: > Set innodb_fast_shutdown > <https://mariadb.com/kb/en/xtradbinnodb-server-system-variables/#innodb_fast_shutdown> > to 0. It can be changed dynamically with SET GLOBAL > <https://mariadb.com/kb/en/set/#global-session>. For example: > SET GLOBAL innodb_fast_shutdown=0; > > - This step is not necessary when upgrading to MariaDB 10.2.5 > <https://mariadb.com/kb/en/mariadb-1025-release-notes/> or later. > > > Can you confirm this is reproducible if you: > > MariaDB> set global innodb_fast_shutdown=0; > # systemctl stop mariadb > # rm /var/lib/mysql/ib_logfile* > > and then do the package upgrade and restart? > > Can you back up the full data set (or snapshot it)? > If so, remove the ib_logfile* files and see if that lets you start up > mysqld? Failing that, you may have to crank up innodb_force_recover=6 > (because this is level to avoid redo log replay), and then mysqldump the > data. You will lose any recent transactions that haven't made it from the > transaction log to the tablespaces. > > > > On Wed, Oct 16, 2019 at 9:46 AM bapt x <baptx...@gmail.com> wrote: > >> @Andrei all the error messages I found were included in my original >> email, let me know how I can provide additional information if no one can >> reproduce the problem. >> I forgot to include maria-discuss@lists.launchpad.net, you can see my >> reply below. >> >> ---------- Forwarded message --------- >> From: bapt x <baptx...@gmail.com> >> Date: Wed, 16 Oct 2019 at 10:35 >> Subject: Re: [Maria-discuss] database corrupted when switching from MySQL >> to MariaDB on Ubuntu 19.04 >> To: Gordan Bobic <gordan.bo...@gmail.com> >> >> >> Thanks for the information. It looks like I did everything properly since >> I was able to reproduce the problem several times with a clean install of >> Ubuntu 19.04 on VirtualBox. I think if someone else tries the steps I >> explained, he can reproduce the problem. Now it would be nice to know if >> there is a way to recover the data. If MariaDB was able to corrupt the >> data, there should be a way to reverse engineer the process and restore the >> data. Maybe a developer that knows well MariaDB upgrade system has a >> solution. >> >> On Wed, 16 Oct 2019 at 10:23, Gordan Bobic <gordan.bo...@gmail.com> >> wrote: >> >>> I don't know if it is recoverable but it sounds like you missed the step >>> of always needing a full, clean shutdown between upgrades with >>> innodb_fast_shutdown=0. Then you can delete ib_logfile*, and upgrade. >>> >>> On Wed, 16 Oct 2019, 09:19 bapt x, <baptx...@gmail.com> wrote: >>> >>>> Hello, >>>> >>>> On Ubuntu 19.04, which uses packages mariadb-server 10.3.17 and >>>> mysql-server 5.7.27, I noticed that if I wanted to switch from MySQL to >>>> MariaDB, the database is corrupted and there is a complete data loss >>>> even if I switch back to MySQL. >>>> In the previous version of Ubuntu, switching from MySQL to MariaDB did >>>> not manage to import data automatically (unlike Debian) but at least it >>>> created a backup of the data in /var/lib/mysql-5.7/ folder which is not >>>> done anymore. >>>> >>>> Here is the error message I saw during install when trying to use the >>>> database corrupted by MariaDB and switching back to MySQL: >>>> "MySQL has been frozen to prevent damage to your system. Please see >>>> /etc/mysql/FROZEN for help." >>>> >>>> And in /var/log/mysql/error.log: >>>> "[ERROR] InnoDB: Unsupported redo log format. The redo log was created >>>> with MariaDB 10.3.17. Please follow the instructions >>>> athttp://dev.mysql.com/doc/refman/5.7/en/upgrading-downgrading.html" >>>> >>>> I was able to reproduce the issue with a clean installation of Ubuntu >>>> 19.04 in VirtualBox. >>>> >>>> Do you know where the problem comes from and if it is possible to fix >>>> the binary data from */var/lib/mysql/* to make it work with either MySQL >>>> or MariaDB? >>>> It looks like MariaDB tried to convert the data ("[ERROR] InnoDB: >>>> Unsupported redo log format") but now it fails with both MySQL and MariaDB. >>>> Is it possible to revert the changes done by MariaDB to make the data >>>> work again with MySQL? (and then do a proper backup with mysqldump) >>>> >>>> Thanks. >>>> >>>> _______________________________________________ >>>> Mailing list: https://launchpad.net/~maria-discuss >>>> Post to : maria-discuss@lists.launchpad.net >>>> Unsubscribe : https://launchpad.net/~maria-discuss >>>> More help : https://help.launchpad.net/ListHelp >>>> >>> _______________________________________________ >> Mailing list: https://launchpad.net/~maria-discuss >> Post to : maria-discuss@lists.launchpad.net >> Unsubscribe : https://launchpad.net/~maria-discuss >> More help : https://help.launchpad.net/ListHelp >> > _______________________________________________ > Mailing list: https://launchpad.net/~maria-discuss > Post to : maria-discuss@lists.launchpad.net > Unsubscribe : https://launchpad.net/~maria-discuss > More help : https://help.launchpad.net/ListHelp >
_______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp