[MDEV-33262] Fatal error 1408 when installing mariadb-server / mariadb-upgrade Created: 2024-01-17  Updated: 2024-01-17

Status: Open
Project: MariaDB Server
Component/s: Platform Debian, Upgrades
Affects Version/s: 10.11.4
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Curtis Spencer Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Debian 12, 10.11.4-MariaDB-1~deb12u1


Attachments: File mariadb-dump.sql     File mariadb_10.11_error.log     File mariadb_10.3_error.log     File mariadb_10.5_error.log     File my.cnf    

 Description   

I recently upgraded a Debian 10 server running MySQL 5.7 to MariaDB 10.3. That upgrade went smoothly so I then upgraded to Debian 11 and MariaDB 10.5. That also went smoothly. I then upgraded to Debian 12 and MariaDB 10.11. While performing that upgrade, I encountered an issue with mariadb-server:

Setting up mariadb-server (1:10.11.4-1~deb12u1) ...
dpkg: error processing package mariadb-server (--configure):
 installed mariadb-server package post-installation script subprocess returned error exit status 1
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for libc-bin (2.36-9+deb12u3) ...
Errors were encountered while processing:
 mariadb-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

I recently upgraded my Debian 10 server running MySQL 5.7 to Debian 11 and MariaDB 10.3. That upgrade went smoothly. I then decided to upgrade to Debian 12 and MariaDB 10.11. While performing that upgrade, I encountered an issue with mariadb-server:

Setting up mariadb-server (1:10.11.4-1~deb12u1) ...
dpkg: error processing package mariadb-server (--configure):
 installed mariadb-server package post-installation script subprocess returned error exit status 1
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for libc-bin (2.36-9+deb12u3) ...
Errors were encountered while processing:
 mariadb-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
I re-ran apt install mariadb-server and got the same error. I then ran apt install -f and dpkg --configure -a but they both returned the same error as well.

Next, I ran apt purge mariadb-server and then tried to reinstall with apt install mariadb-server and got the same error as above.

It appears that the installation itself succeedes as I was able to run systemctl start mariadb so that I could then run mariadb-upgrade but that failed part of the way through with:

Phase 4/7: Running 'mysql_fix_privilege_tables'
ERROR 1408 (HY000) at line 429: Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
FATAL ERROR: Upgrade failed

/var/log/mysql/error.log shows a few errors related to a column type mismatch for mysql.event table but I'm not sure if that is related to the mariadb-upgrade/mysql_fix_privilege_tables error or not.

I ran mariadb-check --check-upgrade --all-databases and all of the tables were marked as "OK".

Running SELECT @@Version; returns "10.11.4-MariaDB-1~deb12u1" so the upgrade appears to have been mostly successful but I'm not sure how to fix the privilege tables.

In addition, every time I run apt install or apt upgrade, dpkg attempts to configure mariadb-server, which kills the mariadb.service. So, I need to figure out how to get this issue resolved.



 Comments   
Comment by Daniel Black [ 2024-01-17 ]

Can you provide a mariadb-dump --no-data mysql , so the structures of the system tables.

Comment by Curtis Spencer [ 2024-01-17 ]

I have attached the output of mariadb-dump.

Generated at Thu Feb 08 10:37:36 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.