MySQL服务剂量开始了

问题描述 投票:0回答:1

当我尝试使用以下方式启动mysql时:

service mysql start

 /etc/init.d/mysql start

然后需要一段时间,它显示:

[....](通过systemctl)启动mysql:mariadb.service的mysql.serviceJob失败,因为超过了超时时间。有关详细信息,请参见“ systemctl status mariadb.service”和“ journalctl -xe”。失败!

现在,当我进入journalctl -xe时显示:

Feb 18 14:54:43 mail systemd[1]: mariadb.service: Start operation timed out. Terminating.
Feb 18 14:55:24 mail systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Feb 18 14:55:24 mail systemd[1]: Failed to start MariaDB 10.1.37 database server.

Feb 18 14:56:14 mail mysqld[8490]: 2019-02-18 14:56:14 140312205868416 [Note] /usr/sbin/mysqld (mysqld 10.1.37-MariaDB-0+deb9u1) starting as process 8490 ...
Feb 18 14:57:44 mail systemd[1]: mariadb.service: Start operation timed out. Terminating.
Feb 18 14:58:25 mail systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Feb 18 14:58:25 mail systemd[1]: Failed to start MariaDB 10.1.37 database server.

我无法再以root用户身份登录。然后我以安全模式启动mysql并更改密码。

mysql service debian
1个回答
0
投票

此错误通常是在您从mysql迁移到mariadb时发生的。这是您需要运行三个命令的解决方案,您的应用程序将再次开始运行。

  • echo“ / usr / sbin / mysqld {}”> /etc/apparmor.d/usr.sbin.mysqld
  • apparmor_parser -v -R /etc/apparmor.d/usr.sbin.mysqld systemctl
  • 重新启动mariadb
© www.soinside.com 2019 - 2024. All rights reserved.