Tag Archives: code=exited

[Solved] Linux starts MySQL service Error: Error code = exited, status = 127

phenomenon

The error reported when starting MySQL service is as follows:

[root@linmo mysql]# systemctl status mysqld
● mysqld.service - MySQL Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since Wed 2021-10-12 09:13:18 UTC; 4s ago
  Process: 1015 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=127)
  Process: 1991 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)

Oct 12 09:13:17 linmo systemd[1]: mysqld.service: control process exited, code=exited status=127
Oct 12 09:13:17 linmo systemd[1]: Failed to start MySQL Server.
Oct 12 09:13:17 linmo systemd[1]: Unit mysqld.service entered failed state.
Oct 12 09:13:17 linmo systemd[1]: mysqld.service failed.
Oct 12 09:13:18 linmo systemd[1]: mysqld.service holdoff time over, scheduling restart.
Oct 12 09:13:18 linmo systemd[1]: start request repeated too quickly for mysqld.service
Oct 12 09:13:18 linmo systemd[1]: Failed to start MySQL Server.
Oct 12 09:13:18 linmo systemd[1]: Unit mysqld.service entered failed state.
Oct 12 09:13:18 linmo systemd[1]: mysqld.service failed.
[root@linmo mysql]#

reason

The system lacks dependent packages: libaio, numactl;

Solution

Install missing dependent packages: libaio, numactl

# install libaio
yum install libaio
# install numactl
#wget wget http://mirror.centos.org/centos-7/7/os/x86_64/Packages/numactl-libs-2.0.9-5.el7_1.x86_64.rpm
# installl numactl
rpm -ivh numactl-libs-2.0.9-5.el7_1.x86_64.rpm
# install perl
yum isntall perl

End

[Solved] main process exited, code=exited, status=203/EXEC

Problem Description:

Oct 13 20:01:08 c_3.50 systemd[1]: Started etcd.
Oct 13 20:01:08 c_3.50 systemd[1]: Starting etcd...
Oct 13 20:01:08 c_3.50 systemd[1]: etcd.service: main process exited, code=exited, status=203/EXEC  //203不能执行
Oct 13 20:01:08 c_3.50 systemd[1]: Unit etcd.service entered failed state.
Oct 13 20:01:08 c_3.50 systemd[1]: etcd.service failed.

Problem solving:

01. Check that the EXE execution does not exist in the configured path

02. Whether the script is added/ bin/bash

Note: the environment variable in the screenshot does not allow ${}, it must be replaced with the entity or written to the environment file

Oct 13 20:15:08 c_3.50 systemd[1]: Started etcd.
Oct 13 20:15:08 c_3.50 systemd[1]: Starting etcd...
Oct 13 20:15:08 c_3.50 systemd[1]: etcd.service: main process exited, code=exited, status=1/FAILURE  //环境变量设置异常
Oct 13 20:15:08 c_3.50 systemd[1]: Unit etcd.service entered failed state.
Oct 13 20:15:08 c_3.50 systemd[1]: etcd.service failed.