当前位置:   article > 正文

MySQL启动失败 ,提示错误:code=exited, status=1/FAILURE_mysqld.service: control process exited, code=exite

mysqld.service: control process exited, code=exited status=1

[root@pc4 mysql]# systemctl status mysqld

● mysqld.service - MySQL Server by xuda

Loaded: loaded (/etc/systemd/system/mysqld.service; enabled; vendor preset: disabled)

Active: failed (Result: exit-code) since Sun 2023-01-22 22:00:27 CST; 58s ago

Docs: man:mysqld(8)

http://dev.mysql.com/doc/refman/en/using-systemd.html

Process: 11790 ExecStart=/application/mysql/bin/mysqld --default-file=/etc/my.cnf (code=exited, status=1/FAILURE)

Main PID: 11790 (code=exited, status=1/FAILURE)

Jan 22 22:00:23 pc4 systemd[1]: Started MySQL Server by xuda.

Jan 22 22:00:27 pc4 systemd[1]: mysqld.service: main process exited, c...RE

Jan 22 22:00:27 pc4 systemd[1]: Unit mysqld.service entered failed state.

Jan 22 22:00:27 pc4 systemd[1]: mysqld.service failed.

Hint: Some lines were ellipsized, use -l to show in full.

看了MySQL的错误日志,发现:

2023-01-22T14:11:12.679082Z 0 [ERROR] [MY-000067] [Server] unknown variable 'default-file=/etc/my.cnf'.

原来是“default-file=/etc/my.cnf”少了一个“s”,应为“defaults-file=/etc/my.cnf”。

修改文件,重新加载

systemctl daemon-reload

启动,成功了

[root@pc4 mysql]# systemctl status mysqld

● mysqld.service - MySQL Server by xuda

Loaded: loaded (/etc/systemd/system/mysqld.service; enabled; vendor preset: disabled)

Active: active (running) since Sun 2023-01-22 22:14:40 CST; 20s ago

Docs: man:mysqld(8)

http://dev.mysql.com/doc/refman/en/using-systemd.html

Main PID: 12125 (mysqld)

Tasks: 38

CGroup: /system.slice/mysqld.service

└─12125 /application/mysql/bin/mysqld --defaults-file=/etc/my.cnf

Jan 22 22:14:40 pc4 systemd[1]: Started MySQL Server by xuda.

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Cpp五条/article/detail/628158
推荐阅读
相关标签
  

闽ICP备14008679号