Home > Back-end >  MariaDB Server startup problem after server power outage
MariaDB Server startup problem after server power outage

Time:08-13

My working MariaDB server is not starting up after the workstation went down because of an apparent power outage. Any attempt to connect to MySQL fails with: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2), and the following is the relevant output I found in error logs:

2022-08-10 23:53:05 0 [ERROR] Couldn't load plugins from 'auth_gssapi.so'.
2022-08-10 23:53:05 0 [ERROR] mysqld: Can't open shared library '/usr/lib/x86_64-linux-gnu/mariadb19/plugin/ha_connect.so' (errno: 22, cannot open shared object file: No such file or directory)
2022-08-10 23:53:05 0 [ERROR] Couldn't load plugins from 'ha_connect.so'.
2022-08-10 23:53:05 0 [ERROR] mysqld: Can't open shared library '/usr/lib/x86_64-linux-gnu/mariadb19/plugin/cracklib_password_check.so' (errno: 22, cannot open shared object file: No such file or directory)
2022-08-10 23:53:05 0 [ERROR] Couldn't load plugins from 'cracklib_password_check.so'.
2022-08-10 23:53:05 0 [ERROR] mysqld: Can't open shared library '/usr/lib/x86_64-linux-gnu/mariadb19/plugin/ha_oqgraph.so' (errno: 22, cannot open shared object file: No such file or directory)
2022-08-10 23:53:05 0 [ERROR] Couldn't load plugins from 'ha_oqgraph.so'.
2022-08-10 23:53:05 0 [ERROR] mysqld: Can't open shared library '/usr/lib/x86_64-linux-gnu/mariadb19/plugin/ha_rocksdb.so' (errno: 22, cannot open shared object file: No such file or directory)
2022-08-10 23:53:05 0 [ERROR] Couldn't load plugins from 'ha_rocksdb.so'.
2022-08-10 23:53:05 0 [ERROR] mysqld: Can't open shared library '/usr/lib/x86_64-linux-gnu/mariadb19/plugin/ha_tokudb.so' (errno: 22, cannot open shared object file: No such file or directory)
2022-08-10 23:53:05 0 [ERROR] Couldn't load plugins from 'ha_tokudb.so'.
2022-08-10 23:53:05 0 [Note] InnoDB: Using Linux native AIO
2022-08-10 23:53:05 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2022-08-10 23:53:05 0 [Note] InnoDB: Uses event mutexes
2022-08-10 23:53:05 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2022-08-10 23:53:05 0 [Note] InnoDB: Number of pools: 1
2022-08-10 23:53:05 0 [Note] InnoDB: Using SSE2 crc32 instructions
2022-08-10 23:53:05 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2022-08-10 23:53:05 0 [Note] InnoDB: Completed initialization of buffer pool
2022-08-10 23:53:05 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2022-08-10 23:53:05 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2022-08-10 23:53:05 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2022-08-10 23:53:05 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2022-08-10 23:53:05 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2022-08-10 23:53:05 0 [Note] InnoDB: Waiting for purge to start
2022-08-10 23:53:05 0 [Note] InnoDB: 10.3.34 started; log sequence number 2938465608; transaction id 4388264
2022-08-10 23:53:05 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2022-08-10 23:53:05 0 [Note] Plugin 'FEEDBACK' is disabled.
2022-08-10 23:53:05 0 [Note] Recovering after a crash using tc.log
2022-08-10 23:53:05 0 [ERROR] Recovery failed! You must enable all engines that were enabled at the moment of the crash
2022-08-10 23:53:05 0 [ERROR] Crash recovery failed. Either correct the problem (if it's, for example, out of memory error) and restart, or delete tc log and start mysqld with --tc-heuristic-recover={commit|rollback}
2022-08-10 23:53:05 0 [ERROR] Can't init tc log
2022-08-10 23:53:05 0 [ERROR] Aborting

I have tried both sudo mysqld_safe --skip-grant-tables and setting innodb_force_recovery=1; both producing similar error logs.

What might be the issue here? Have I lost my databases?

CodePudding user response:

This turned out to be caused by a previous package upgrade that was pending a system reboot. MariaDB package was upgraded, but the related plugins weren't installed, and this was preventing the daemon to start as mentioned in the question comments. It is strongly recommended as stated in the comments to have a backup power solution present and I have also launched an automated DB backup script at specific intervals.

  • Related