我在 Percona Cluster 的一个节点中重新启动了 MySQL 服务器。 由于重启花费了很多时间,我中断了这个过程。我尝试再次重新启动 MySQL 服务器。我收到以下错误:
Stale sst_in_progress file in datadir
我点击了这个链接,https://www.percona.com/forums/questions-discussions/percona-xtradb-cluster/46846-sql-cluster-issue-need-help-please , 并删除其中提到的 sst_in_progress 文件。
现在,当我尝试重新启动 MySQL 服务器时,我得到了这个:
● mysql.service - LSB: Start and stop the mysql (Percona XtraDB Cluster) daemon
Loaded: loaded (/etc/init.d/mysql; bad; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2018-03-14 11:04:07 IST; 16min ago
Docs: man:systemd-sysv-generator(8)
Process: 23568 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)
Mar 14 11:04:00 systemd[1]: Starting LSB: Start and stop the mysql (Percona XtraDB Cluster) daemon...
Mar 14 11:04:00 mysql[23568]: * Starting MySQL (Percona XtraDB Cluster) database server mysqld
Mar 14 11:04:00 /etc/init.d/mysql[23614]: MySQL PID not found, pid_file detected/guessed: /var/run/mysqld/mysqld.pid
Mar 14 11:04:07 mysql[23568]: * The server quit without updating PID file (/var/run/mysqld/mysqld.pid).
Mar 14 11:04:07 mysql[23568]: ...fail!
Mar 14 11:04:07 systemd[1]: mysql.service: Control process exited, code=exited status=1
Mar 14 11:04:07 systemd[1]: Failed to start LSB: Start and stop the mysql (Percona XtraDB Cluster) daemon.
Mar 14 11:04:07 systemd[1]: mysql.service: Unit entered failed state.
Mar 14 11:04:07 systemd[1]: mysql.service: Failed with result 'exit-code'.
还有一件事是在重启期间没有日志写入 mysql-error.log 文件,因此我无法继续调试。
最佳答案
这里最好的解决方案是简单地 rm -rf $datadir
并重新启动节点,但无法看到更多信息。它确实会 SST,这取决于数据集,需要一段时间。通过 gigE 每 100GB 数据估计需要 1 小时。
关于mysql - 无法重启 MySQL 服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49271169/