Py学习  »  DATABASE

mysql不重新启动

thierryler • 5 年前 • 1637 次点击  

我试图重新启动mysql 5.7: service mysql restart

但它失败了,我不明白为什么:

Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.

我看不出日志里有什么问题:

systemctl status mariadb.service
● mariadb.service - MariaDB 10.1.37 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2019-02-25 22:02:52 GMT; 1min 9s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 15467 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=127)
 Main PID: 28679 (code=exited, status=0/SUCCESS)

Feb 25 22:02:52 stretch systemd[1]: Starting MariaDB 10.1.37 database server...
Feb 25 22:02:52 stretch systemd[1]: mariadb.service: Control process exited, code=exited status=127
Feb 25 22:02:52 stretch systemd[1]: Failed to start MariaDB 10.1.37 database server.
Feb 25 22:02:52 stretch systemd[1]: mariadb.service: Unit entered failed state.
Feb 25 22:02:52 stretch systemd[1]: mariadb.service: Failed with result 'exit-code'.

欢迎任何帮助。。。

我在Debian9上,有1800Mo内存空闲。

以下是《华尔街日报》的报道:

journalctl -xe

Feb 26 08:09:01 stretch CRON[16792]: pam_unix(cron:session): session opened for user root by (uid=0)
Feb 26 08:09:01 stretch CRON[16793]: (root) CMD (  [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Feb 26 08:09:01 stretch CRON[16792]: pam_unix(cron:session): session closed for user root
Feb 26 08:17:01 stretch CRON[16794]: pam_unix(cron:session): session opened for user root by (uid=0)
Feb 26 08:17:01 stretch CRON[16795]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Feb 26 08:17:01 stretch CRON[16794]: pam_unix(cron:session): session closed for user root
Feb 26 08:25:23 stretch systemd[1]: Starting MariaDB 10.1.37 database server...
-- Subject: Unit mariadb.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit mariadb.service has begun starting up.
Feb 26 08:25:23 stretch systemd[1]: mariadb.service: Control process exited, code=exited status=127
Feb 26 08:25:23 stretch systemd[1]: Failed to start MariaDB 10.1.37 database server.
-- Subject: Unit mariadb.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit mariadb.service has failed.
-- 
-- The result is failed.
Feb 26 08:25:23 stretch systemd[1]: mariadb.service: Unit entered failed state.
Feb 26 08:25:23 stretch systemd[1]: mariadb.service: Failed with result 'exit-code'.
Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/52669
 
1637 次点击  
文章 [ 2 ]  |  最新文章 5 年前
danblack
Reply   •   1 楼
danblack    6 年前

低于 Process: ExecStartPre 返回存在错误状态

基于错误127,我怀疑 /usr/bin/install 不存在。

haveyaseen
Reply   •   2 楼
haveyaseen    5 年前

我在升级到Debian Buster(从MariaDB 10.1升级到10.3)时也遇到了这个错误。跑步 mysqld 我和 mysql_upgrade 不管怎样,这两种方法都有效。尝试执行以下命令以动态重新启动systemd。另见 https://unix.stackexchange.com/a/419375 .

systemctl daemon-reexec

如果不这样做,重新启动可能也会解决这个问题。评论 ExecStartPre 在里面 /etc/systemd/system/mysql.service 还不够 执行启动程序 命令然后失败(也与退出代码127,即“命令未找到”)。