Artix Linux Forum

Artix Linux => Applications & Software => Topic started by: 0xf4b10 on 10 July 2022, 14:30:23

Title: MySQL/Mariadb stopped working after recent updates
Post by: 0xf4b10 on 10 July 2022, 14:30:23
Hello, I did an
Quote
pacman -Syu
and after that mysql service is no longer working. I use it with openrc service manager. When I run
Quote
rc-service mysql start
it fails with the errors:

Quote
sudo rc-service mysql start
Starting MariaDB.220710 09:26:18 mysqld_safe Logging to '/var/lib/mysql/artixpc.err'.
220710 09:26:18 mysqld_safe Starting mariadbd daemon with databases from /var/lib/mysql
./etc/init.d/mysql: line 263: kill: (6944) - No such process
/etc/init.d/mysql: line 276: log_failure_msg: command not found

and in the log /var/lib/mysql/artixpc.err I've got:

Quote
220710 09:26:18 mysqld_safe Starting mariadbd daemon with databases from /var/lib/mysql
2022-07-10  9:26:18 0 [Note] /usr/bin/mariadbd (server 10.8.3-MariaDB) starting as process 7049 ...
2022-07-10  9:26:18 0 [Note] InnoDB: Compressed tables use zlib 1.2.12
2022-07-10  9:26:18 0 [Note] InnoDB: Number of transaction pools: 1
2022-07-10  9:26:18 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2022-07-10  9:26:18 0 [Note] InnoDB: Using Linux native AIO
2022-07-10  9:26:18 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
2022-07-10  9:26:18 0 [Note] InnoDB: Completed initialization of buffer pool
2022-07-10  9:26:18 0 [Note] InnoDB: File system buffers for log disabled (block size=4096 bytes)
2022-07-10  9:26:18 0 [ERROR] InnoDB: Missing FILE_CHECKPOINT(9211053) at 9211053
2022-07-10  9:26:18 0 [ERROR] InnoDB: Log scan aborted at LSN 9211053
2022-07-10  9:26:18 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2022-07-10  9:26:18 0 [Note] InnoDB: Starting shutdown...
2022-07-10  9:26:19 0 [ERROR] Plugin 'InnoDB' init function returned error.
2022-07-10  9:26:19 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2022-07-10  9:26:19 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2022-07-10  9:26:19 0 [ERROR] Aborting
220710 09:26:19 mysqld_safe mysqld from pid file /var/lib/mysql/artixpc.pid ended
Title: Re: MySQL/Mariadb stopped working after recent updates
Post by: cat herders of linux on 11 July 2022, 19:45:47
ok no one is responding here.

are you sure the init service file is installed?  i assumed it would be since it failed after update but please humor me.
Title: Re: MySQL/Mariadb stopped working after recent updates
Post by: 0xf4b10 on 11 July 2022, 21:33:14
ok no one is responding here.

are you sure the init service file is installed?  i assumed it would be since it failed after update but please humor me.

Yes sir, it is installed, and it used to work even without the mariadb-openrc package installed...

btw, is this pamac? which gui package manager is that?
Title: Re: MySQL/Mariadb stopped working after recent updates
Post by: cat herders of linux on 11 July 2022, 21:49:33
Yes sir, it is installed, and it used to work even without the mariadb-openrc package installed...

btw, is this pamac? which gui package manager is that?
not a sir.  but thank you.

it is indeed pamac-manager but with a dark theme applied to it.  i like visuals when i do file searches and it gives easy on the eyes details of the files included in a package.  I don't install with it, i use the command line for that but for searches of all kinds i appreciate it.

material-black-plum with material-black-plum-suru icons.
Title: Re: MySQL/Mariadb stopped working after recent updates
Post by: cat herders of linux on 11 July 2022, 21:57:18
sudo rc-update add mariadb   ???

clearly there's a system error the devs are probably working on a fix to whatever got flummoxed on the update.  we are just chatting until that happens i suppose since no one else replied before me.

see this is what you wrote
Quote
rc-service mysql start

but the openrc service file is mariadb-openrc

so maybe it should be rc-service mariadb start

??

Title: Re: MySQL/Mariadb stopped working after recent updates
Post by: 0xf4b10 on 12 July 2022, 00:27:10
sudo rc-update add mariadb   ???

clearly there's a system error the devs are probably working on a fix to whatever got flummoxed on the update.  we are just chatting until that happens i suppose since no one else replied before me.

see this is what you wrote
but the openrc service file is mariadb-openrc

so maybe it should be rc-service mariadb start

??




Yes, I've tried with mariadb service and it gives the exact same error. And it is already added to default runlevel.
Title: Re: MySQL/Mariadb stopped working after recent updates
Post by: ndowens on 12 July 2022, 01:12:56
Quote
2022-07-10  9:26:19 0 [ERROR] Plugin 'InnoDB' init function returned error.
2022-07-10  9:26:19 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2022-07-10  9:26:19 0 [ERROR] Unknown/unsupported storage engine: InnoDB
Is the key, looks like it doesn't know what a innodb is
Title: Re: MySQL/Mariadb stopped working after recent updates
Post by: cat herders of linux on 12 July 2022, 02:07:03
https://bobcares.com/blog/error-plugin-innodb-registration-as-a-storage-engine-failed/
Title: Re: MySQL/Mariadb stopped working after recent updates
Post by: 0xf4b10 on 12 July 2022, 14:54:30
https://bobcares.com/blog/error-plugin-innodb-registration-as-a-storage-engine-failed/

it seems my case is different from this one, in my "my.cnf" there's already no config "local-inline=0", but I tried anyway to move the logs as suggested and it didn't solved the error...
Title: Re: MySQL/Mariadb stopped working after recent updates
Post by: cat herders of linux on 13 July 2022, 00:28:38
it seems my case is different from this one, in my "my.cnf" there's already no config "local-inline=0", but I tried anyway to move the logs as suggested and it didn't solved the error...

Code: [Select]
rm /var/lib/mysql/ib_logfile0
rm /var/lib/mysql/ib_logfile1

those?
Title: Re: MySQL/Mariadb stopped working after recent updates
Post by: 0xf4b10 on 13 July 2022, 13:53:29
Code: [Select]
rm /var/lib/mysql/ib_logfile0
rm /var/lib/mysql/ib_logfile1

those?

yup, exactly
Title: Re: MySQL/Mariadb stopped working after recent updates
Post by: anoki on 17 July 2022, 20:37:50
Hi,

For months now, I can't run any akonadiserver based package because of that mysql/mariadb errors.

In my case, when I run
Code: [Select]
rc-service mariadb start
it gives me:

Code: [Select]
mariadb           | * Datadir '/var/lib/mysql' is empty or invalid.
mariadb           | * Run '/etc/init.d/mariadb setup' to create new database.
mariadb           | * ERROR: mariadb failed to start

Running this
Code: [Select]
/etc/init.d/mariadb setup
gives me:
Code: [Select]
FATAL ERROR: Could not find ./share/mysql/fill_help_tables.sql
Title: Re: MySQL/Mariadb stopped working after recent updates
Post by: cat herders of linux on 17 July 2022, 21:23:00
Hi,

For months now, I can't run any akonadiserver based package because of that mysql/mariadb errors.

In my case, when I run
Code: [Select]
rc-service mariadb start
it gives me:

Code: [Select]
mariadb           | * Datadir '/var/lib/mysql' is empty or invalid.
mariadb           | * Run '/etc/init.d/mariadb setup' to create new database.
mariadb           | * ERROR: mariadb failed to start

Running this
Code: [Select]
/etc/init.d/mariadb setup
gives me:
Code: [Select]
FATAL ERROR: Could not find ./share/mysql/fill_help_tables.sql

https://www.programmerall.com/article/570013961/

is that relevant to you at all as you understand it?
Title: Re: MySQL/Mariadb stopped working after recent updates
Post by: replabrobin on 18 July 2022, 10:01:35
I can run mariadb 10.8.3-1 under latest runit-world
Code: [Select]
$ cat /etc/runit/sv/mariadb/run 
#!/bin/sh
[ ! -d /run/mysqld ] && mkdir -p /run/mysqld
chown mysql:mysql /run/mysqld
exec chpst -u mysql:mysql mysqld --user=mysql 2>&1

the message related to fill_help_tables.sql seems to indicate that the command should be run in /usr as there is certainly a file at /usr/share/mysql/fill_help_tables.sql so if . is not /usr the indicated file would not be found.
Title: Re: MySQL/Mariadb stopped working after recent updates
Post by: nous on 18 July 2022, 10:24:41
Have you paid attention to the post install/upgrade messages?
Code: [Select]
:: You need to initialize the MariaDB data directory prior to starting
   the service. This can be done with mariadb-install-db command, e.g.:
   mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
Code: [Select]
:: MariaDB was updated to a new feature release. To update the data run:
   mariadb-upgrade -u root -p && restart service
Title: Re: MySQL/Mariadb stopped working after recent updates
Post by: 0xf4b10 on 19 July 2022, 01:57:48
Have you paid attention to the post install/upgrade messages?
Code: [Select]
:: You need to initialize the MariaDB data directory prior to starting
   the service. This can be done with mariadb-install-db command, e.g.:
   mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
Code: [Select]
:: MariaDB was updated to a new feature release. To update the data run:
   mariadb-upgrade -u root -p && restart service

Yes, for sure. As I said, mysql was working normally for weeks, then this error began
Title: Re: MySQL/Mariadb stopped working after recent updates
Post by: nous on 19 July 2022, 12:14:17
Oh, my bad, I thought I was responding to @anoki. See https://bbs.archlinux.org/viewtopic.php?id=276839

[EDIT] Just upgraded a system and the post-update message says this exact thing. Users should ruin mariadb-upgrade BEFORE restarting the service or rebooting. Never skip reading the upgrade messages.
Title: Re: MySQL/Mariadb stopped working after recent updates
Post by: anoki on 19 July 2022, 13:40:33
Have you paid attention to the post install/upgrade messages?
Code: [Select]
:: You need to initialize the MariaDB data directory prior to starting
   the service. This can be done with mariadb-install-db command, e.g.:
   mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
Code: [Select]
:: MariaDB was updated to a new feature release. To update the data run:
   mariadb-upgrade -u root -p && restart service
Thanks, this solved my problem.

However, when I check mariadb status:
Code: [Select]
$ sudo rc-service mariadb status
 * status: crashed
Any help is appreciated.