Job for mariadb.service failed because the control process exited with error code.

youyoums

Verified User
Joined
Jul 21, 2011
Messages
37
When i upgrade to DirectAdmin 1.54.1 and mariadb 10.1.x or 10.2.18,i can't connect to local MySQL server,this is the details:

centos 7.5
Apache 2.4.35 Running
DirectAdmin 1.54.1 Running
MariaDB 10.2.18 *** Stopped ***
Named 9.9.4 Running
sshd Running
Php 7.2.11 Installed

[root@server ~]# systemctl start mariadb.service
Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
[root@server ~]# systemctl status mariadb.service
● mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; bad; vendor preset: disabled)
Drop-In: /etc/systemd/system/mariadb.service.d
└─migrated-from-my.cnf-settings.conf
Active: failed (Result: exit-code) since Thu 2018-10-18 23:50:08 CST; 31s ago
Process: 13878 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Process: 13863 ExecStartPre=/bin/sh -c [ -x /usr/bin/galera_recovery ] || exit 0; VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
Process: 13861 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Main PID: 13878 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"

Oct 18 23:50:08 server.x.com mysqld[13878]: 2018-10-18 23:50:08 140201691949248 [Note] InnoDB: Starting shutdown...
Oct 18 23:50:08 server.x.com mysqld[13878]: 2018-10-18 23:50:08 140201691949248 [ERROR] Plugin 'InnoDB' init function returned error.
Oct 18 23:50:08 server.x.com mysqld[13878]: 2018-10-18 23:50:08 140201691949248 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
Oct 18 23:50:08 server.x.com mysqld[13878]: 2018-10-18 23:50:08 140201691949248 [Note] Plugin 'FEEDBACK' is disabled.
Oct 18 23:50:08 server.x.com mysqld[13878]: 2018-10-18 23:50:08 140201691949248 [ERROR] Unknown/unsupported storage engine: InnoDB
Oct 18 23:50:08 server.x.com mysqld[13878]: 2018-10-18 23:50:08 140201691949248 [ERROR] Aborting
Oct 18 23:50:08 server.x.com systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE
Oct 18 23:50:08 server.x.com systemd[1]: Failed to start MariaDB database server.
Oct 18 23:50:08 server.x.com systemd[1]: Unit mariadb.service entered failed state.
Oct 18 23:50:08 server.x.com systemd[1]: mariadb.service failed.
[root@server ~]#
 
Hello,

Seems InnoDB tables got corrupted. You need to recover your MySQL installation:

1. Make sure you've got dumps
2. clean install MySQL
3. Import MySQL dumps.
 
Thank you,but i don't know how to do it?
Oct 19 13:08:01 server mysqld: 2018-10-19 13:08:01 140153591892224 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.
Oct 19 13:08:01 server mysqld: 2018-10-19 13:08:01 140153591892224 [Note] InnoDB: Using mutexes to ref count buffer pool pages
Oct 19 13:08:01 server mysqld: 2018-10-19 13:08:01 140153591892224 [Note] InnoDB: The InnoDB memory heap is disabled
Oct 19 13:08:01 server mysqld: 2018-10-19 13:08:01 140153591892224 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
Oct 19 13:08:01 server mysqld: 2018-10-19 13:08:01 140153591892224 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
Oct 19 13:08:01 server mysqld: 2018-10-19 13:08:01 140153591892224 [Note] InnoDB: Compressed tables use zlib 1.2.7
Oct 19 13:08:01 server mysqld: 2018-10-19 13:08:01 140153591892224 [Note] InnoDB: Using Linux native AIO
Oct 19 13:08:01 server mysqld: 2018-10-19 13:08:01 140153591892224 [Note] InnoDB: Using SSE crc32 instructions
Oct 19 13:08:01 server mysqld: 2018-10-19 13:08:01 140153591892224 [Note] InnoDB: Initializing buffer pool, size = 128.0M
Oct 19 13:08:01 server mysqld: 2018-10-19 13:08:01 140153591892224 [Note] InnoDB: Completed initialization of buffer pool
Oct 19 13:08:01 server mysqld: 2018-10-19 13:08:01 140153591892224 [Note] InnoDB: Highest supported file format is Barracuda.
Oct 19 13:08:01 server mysqld: 2018-10-19 13:08:01 140153591892224 [Note] InnoDB: Starting crash recovery from checkpoint LSN=10421866366
Oct 19 13:08:01 server mysqld: 2018-10-19 13:08:01 140153591892224 [Note] InnoDB: Restoring possible half-written data pages from the doublewrite buffer...
Oct 19 13:08:01 server mysqld: InnoDB: Set innodb_force_recovery to ignore this error.
Oct 19 13:08:01 server mysqld: 2018-10-19 13:08:01 140153591892224 [ERROR] Plugin 'InnoDB' init function returned error.
Oct 19 13:08:01 server mysqld: 2018-10-19 13:08:01 140153591892224 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
Oct 19 13:08:01 server mysqld: 2018-10-19 13:08:01 140153591892224 [Note] Plugin 'FEEDBACK' is disabled.
Oct 19 13:08:01 server mysqld: 2018-10-19 13:08:01 140153591892224 [ERROR] Unknown/unsupported storage engine: InnoDB
Oct 19 13:08:01 server mysqld: 2018-10-19 13:08:01 140153591892224 [ERROR] Aborting
Oct 19 13:08:06 server mysqld: Error in my_thread_global_end(): 1 threads didn't exit
Oct 19 13:08:06 server systemd: mariadb.service: main process exited, code=exited, status=1/FAILURE
Oct 19 13:08:06 server systemd: Failed to start MariaDB database server.
Oct 19 13:08:06 server systemd: Unit mariadb.service entered failed state.
Oct 19 13:08:06 server systemd: mariadb.service failed.
 
Search the forums then, there are already threads describing on how to reinstall MySQL/MariaDB or hire somebody to do for you.
 
[...cut...]
Oct 19 13:08:01 server mysqld: 2018-10-19 13:08:01 140153591892224 [Note] InnoDB: Starting crash recovery from checkpoint LSN=10421866366
Oct 19 13:08:01 server mysqld: 2018-10-19 13:08:01 140153591892224 [Note] InnoDB: Restoring possible half-written data pages from the doublewrite buffer...
Oct 19 13:08:01 server mysqld: InnoDB: Set innodb_force_recovery to ignore this error.
Oct 19 13:08:01 server mysqld: 2018-10-19 13:08:01 140153591892224 [ERROR] Plugin 'InnoDB' init function returned error.
Oct 19 13:08:01 server mysqld: 2018-10-19 13:08:01 140153591892224 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
Oct 19 13:08:01 server mysqld: 2018-10-19 13:08:01 140153591892224 [Note] Plugin 'FEEDBACK' is disabled.
Oct 19 13:08:01 server mysqld: 2018-10-19 13:08:01 140153591892224 [ERROR] Unknown/unsupported storage engine: InnoDB
Oct 19 13:08:01 server mysqld: 2018-10-19 13:08:01 140153591892224 [ERROR] Aborting
[...cut...]

I am just guessing here and might be wrong, but at your own risk you could try this:

Edit /etc/my.cnf and add this (if it already exist then just change the value to 48M):
Code:
innodb_log_file_size=48M

Then move the log files to another folder:
Code:
mv /var/lib/mysql/ib_log* /root

Then try to start MariaDB:
Code:
systemctl start mysqld.service

If this did not help, then you might try to do all the steps in this guide: http://blackbird.si/mysql-corrupted-innodb-tables-recovery-step-by-step-guide/
 
Back
Top