由于明显的停电,我的工作MariaDB服务器在工作站关闭后没有启动。任何连接到MySQL的尝试都会通过:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)失败,下面是我在错误日志中找到的相关输出:
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我尝试过sudo mysqld_safe --skip-grant-tables和设置innodb_force_recovery=1;两者都生成类似的错误日志。
这里可能有什么问题?我的数据库丢了吗?
发布于 2022-08-13 04:50:10
结果发现,这是由于系统重新启动之前进行的包升级造成的。MariaDB包已经升级,但是相关插件没有安装,这就阻止了守护进程像问题注释中提到的那样启动。如注释中所述,强烈建议提供备份电源解决方案,并且我还在特定的时间间隔内启动了自动DB备份脚本。
https://stackoverflow.com/questions/73311804
复制相似问题