← Back to team overview

maria-discuss team mailing list archive

Re: Maria-db refuses to start

 

Hi Jogchum,

Sorry, I did not notice that you had a question for me.

On Sun, Oct 16, 2022 at 11:02 AM Jogchum Reitsma
<jogchum.reitsma@xxxxxxxxx> wrote:
>> Op 14-10-2022 om 12:45 schreef Marko Mäkelä:
>>
>>Hi Jogchum,
>>
>>On Wed, Oct 12, 2022 at 4:30 PM Jogchum Reitsma
>><jogchum.reitsma@xxxxxxxxx> wrote:
>>[...]
>>
>>When trying to start it manually, I got the message
>
>>[ERROR] InnoDB: Upgrade after a crash is not supported. The redo log was
>>created with MariaDB 10.5.8.
>
>>Searching that message, I saw a post on
>>https://bbs.archlinux.org/viewtopic.php?id=259364
>
> <...>
>
>>The correct advice is to install MariaDB Server (any version between
>>10.5 and 10.7 should do), shut down the database, and then upgrade to
>>10.8.
>>
>>Before 10.5 (MDEV-12353), the last time the redo log format was
>>changed was in MariaDB Server 10.2. If you got that error message when
>>attempting to upgrade from something older than 10.5, then you should
>>use the exact same major version of MariaDB to perform the shutdown,
>>because there were some changes to the redo log format in each major
>>release between 10.1 and 10.5.
>>
>>I hope that someone can post a correction to that forum.
[...]
> I uninstalled the mariadb version from opensuse Tumbleweed,
> and downloaded and installed mariadb-10.6.10-linux-systemd-x86_64 (init system systemd)in /usr/local, according to the steps explained in the INSTALL_BINARY document.
>
> My assumption of the next steps to take is
>
> - create /usr/local/mysql/data
> - chown:chgrp it to mysql:mysql
> - in /etc/my.cnf, set /usr/local/mysql/data being the data directory (with opensuse, that is normally /var/lib/mysql, by the way)
> - do a mount --bind from my real data directory to /usr/local/mysql/data
> - then start the database with /usr/local/bin/mysqld_safe --user=mysql &
>
> Are the steps correct?
>
> If so, I would think the next thing to do is to stop the server with kill -15 <process-id>, remove the /usr/local/mariadb-10.6.10-linux-systemd-x86_64 directory,
> and install the current TW-version.

Yes, the steps look roughly correct, possibly except for the part of
shutting down the 10.6.10 server.

As far as the server is concerned, SIGTERM (signal 15) or SIGQUIT
should initiate a shutdown.

I would think that on systemd, the preferred way to start and stop
services would be the following:

systemctl start mariadb
systemctl stop mariadb

Systemd could actually take the role of mysqld_safe.

It could be simplest to start the server directly as "mariadbd" so
that nothing will keep restarting it after you initiated the shutdown.
If you run the process in the foreground, then ctrl-\ should be
SIGQUIT and it should initiate a shutdown.

You'd better check with "pgrep mariadbd" or "pgrep mysqld" that
nothing is running, both before starting and after shutting down the
server.

I will clarify the error message. For 10.3 and 10.4, it will look like this:
https://github.com/MariaDB/server/commit/9ac8be4e2980aa995117147e39ae5b7ad79fc980
Starting with 10.5, it may additionally suggest to use a version not
later than MariaDB 10.4.
Starting with 10.8, it may additionally suggest to use a version not
later than MariaDB 10.7.

With best regards,

Marko Mäkelä
-- 
Marko Mäkelä, Lead Developer InnoDB
MariaDB Corporation


Follow ups

References