# systemctl status mysqld
● mysqld.service – MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: deactivating (final-sigterm) (Result: exit-code)
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 67447 ExecStart=/usr/sbin/mysqld –daemonize –pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=1/FAILURE)
Process: 67424 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
CGroup: /system.slice/mysqld.service
└─67450 /usr/sbin/mysqld –daemonize –pid-file=/var/run/mysqld/mysqld.pid

Oct 15 22:45:48 mysql03 systemd[1]: mysqld.service holdoff time over, scheduling restart.
Oct 15 22:45:48 mysql03 systemd[1]: Stopped MySQL Server.
Oct 15 22:45:48 mysql03 systemd[1]: Starting MySQL Server…
Oct 15 22:45:48 mysql03 mysqld_pre_systemd[67424]: 2019-10-15T14:45:48.920182Z 0 [ERROR] –initialize specified but the data directory has files in it. Aborting.
Oct 15 22:45:48 mysql03 mysqld_pre_systemd[67424]: 2019-10-15T14:45:48.920231Z 0 [ERROR] Aborting
Oct 15 22:45:50 mysql03 systemd[1]: mysqld.service: control process exited, code=exited status=1

解决办法:rm -rf /var/lib/mysql/*

删除后重启服务成功

作者 匿名

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

4 × 5 =