Termux MariaDB 升级后报错解决技术
有个事情需要折腾,于是 Termux 升级后导致数据库 Mariadb 无法启动,服务自然不可用了,抽空解决之...
报错如下:
2020-11-15 19:24:34 0 [Note] mysqld (mysqld 10.5.5-MariaDB) starting as process 32220 ... 2020-11-15 19:24:34 0 [Warning] Could not increase number of max_open_files to more than 1024 (request: 32182) 2020-11-15 19:24:34 0 [Warning] Changed limits: max_open_files: 1024 max_connections: 151 (was 151) table_cache: 421 (was 2000) 2020-11-15 19:24:34 0 [Note] InnoDB: Uses event mutexes 2020-11-15 19:24:34 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 2020-11-15 19:24:34 0 [Note] InnoDB: Number of pools: 1 2020-11-15 19:24:34 0 [Note] InnoDB: Using generic crc32 instructions 2020-11-15 19:24:34 0 [Note] mysqld: O_TMPFILE is not supported on /data/data/com.termux/files/usr/tmp (disabling future attempts) 2020-11-15 19:24:34 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728 2020-11-15 19:24:34 0 [Note] InnoDB: Completed initialization of buffer pool 2020-11-15 19:24:34 0 [ERROR] InnoDB: Upgrade after a crash is not supported. The redo log was created with MariaDB 10.4.12. 2020-11-15 19:24:34 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error 2020-11-15 19:24:34 0 [Note] InnoDB: Starting shutdown... 2020-11-15 19:24:35 0 [ERROR] Plugin 'InnoDB' init function returned error. 2020-11-15 19:24:35 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 2020-11-15 19:24:35 0 [Note] Plugin 'FEEDBACK' is disabled. 2020-11-15 19:24:35 0 [ERROR] Unknown/unsupported storage engine: InnoDB 2020-11-15 19:24:35 0 [ERROR] Aborting
解决方案:
$ cd ../usr/var/lib/mysql/ $ mv ib_logfile0 ib_logfile0.bak $ mv ib_logfile1 ib_logfile1.bak
然后重启解决,OK。
$ mysqld_safe &
暂无