gpt4 book ai didi

MySQL 从 5.7 升级到 8.0 失败,在步骤 EXEC 生成 mysql-systemd-start 时失败

转载 作者:行者123 更新时间:2023-11-29 16:02:47 24 4
gpt4 key购买 nike

我尝试使用以下命令将 MySQL 5.7.21 更新到 MySQL 8.0

wget https://repo.mysql.com//mysql-apt-config_0.8.10-1_all.deb
sudo dpkg -i mysql-apt-config_0.8.10-1_all.deb
sudo apt-get update
sudo apt-get install mysql-server

但是安装步骤会导致错误,提示

systemd[1]: Starting MySQL Community Server...
systemd[15390]: mysql.service: Failed at step EXEC spawning /usr/share/mysql/mysql-systemd-start: No such file or directory
systemd[1]: mysql.service: Control process exited, code=exited status=203
systemd[1]: Failed to start MySQL Community Server.
systemd[1]: mysql.service: Unit entered failed state.
systemd[1]: mysql.service: Failed with result 'exit-code'.
systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
systemd[1]: Stopped MySQL Community Server.
systemd[1]: Starting MySQL Community Server...
systemd[15399]: mysql.service: Failed at step EXEC spawning /usr/share/mysql/mysql-systemd-start: No such file or directory
systemd[1]: mysql.service: Control process exited, code=exited status=203
systemd[1]: Failed to start MySQL Community Server.
systemd[1]: mysql.service: Unit entered failed state.
systemd[1]: mysql.service: Failed with result 'exit-code'.
systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
systemd[1]: Stopped MySQL Community Server.
systemd[1]: Starting MySQL Community Server...
systemd[15424]: mysql.service: Failed at step EXEC spawning /usr/share/mysql/mysql-systemd-start: No such file or directory
systemd[1]: mysql.service: Control process exited, code=exited status=203
systemd[1]: Failed to start MySQL Community Server.
systemd[1]: mysql.service: Unit entered failed state.
systemd[1]: mysql.service: Failed with result 'exit-code'.
systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
systemd[1]: Stopped MySQL Community Server.

我真的不确定在哪里可以找到这个文件mysql-systemd-start,因为当我查看/usr/share/mysql/时,目录没有找到存在!

感谢您的帮助。

最佳答案

修复的两个步骤:

  1. vim/etc/systemd/system/mysql.service 并删除 ExecStartPre=/usr/share/mysql/mysql-systemd-start preExecStartPost=/usr/share/mysql/mysql-systemd-start post

  2. 重新启动

关于MySQL 从 5.7 升级到 8.0 失败,在步骤 EXEC 生成 mysql-systemd-start 时失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56034269/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com