MYSQL服务/数据库未在MAC中启动XAMPP-无消息 [英] MYSQL Service / Database not starting XAMPP in MAC - No Message

查看:189
本文介绍了MYSQL服务/数据库未在MAC中启动XAMPP-无消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在MAC OS的XAMPP版本7.2.11-1上启动MySQL服务器

I tried starting MySQL server on XAMPP version 7.2.11 - 1 on MAC OS

我重新安装了XAMPP服务器,但无济于事。

I reinstalled the XAMPP server but it couldn't help.

** XAMPP服务器事件**即使通过将端口号也更新为其他端口多次重新启动服务,也没有提供任何线索或错误消息。

** XAMPP Server events** did not provide any clue or error message even after restarting the services several times by updating the port number to the different port as well.

Starting MySQL Database...

Starting MySQL Database...

Starting MySQL Database...
Stopping all servers...
Stopping Apache Web Server...
/Applications/XAMPP/xamppfiles/apache2/scripts/ctl.sh : httpd stopped
Stopping ProFTPD...
Stopping all servers...
Restarting all servers...
Starting MySQL Database...

然后我尝试使用命令直接在终端上运行它

Then I tried running it directly from the terminal using the command

sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start

仍然没有用。

推荐答案

要了解一个问题,我使用命令检查了日志

To understand the problem I checked the logs my using the command

sudo nano /Applications/XAMPP/xamppfiles/var/mysql/USER-MacBook-Air.local.err

我发现症状或错误

[ERROR] Bad magic header in tc log
[ERROR] Crash recovery failed. Either correct the problem (if it's, for example, out of memory error) and restart, or delete tc log and start mysqld with --tc-heuristic-recover={commit|rollback}
[ERROR] Can't init tc log
[ERROR] Aborting

要解决此问题,只需删除或重命名tc.log 文件,并且当tc日志文件头不是可写格式时,就会生成此错误。

To solve this simply Remove or Rename the tc.log file and this error is generated when the tc log file header is not in a writable format.

这意味着基于内存映射的文件的事务协调器日志的头腐败的。要从此错误中恢复,请删除-log-tc 服务器选项定义的文件,然后使用设置为-tc-heuristic-recover 的选项重新启动服务器。

This means that the header of the memory-mapped file-based transaction coordinator log is corrupt. To recover from this error, delete the file defined by the --log-tc server option, and then restart the server with the --tc-heuristic-recover option set.

使用 docker 时会发生此问题。在这种情况下,可能是由于将MariaDB容器版本与其他MariaDB或MySQL版本的数据目录一起使用而引起的。因此,一些潜在的修复方法是:

This issue is known to occur when using docker. In that case, the problem may be caused by using a MariaDB container version with a data directory from a different MariaDB or MySQL version. Therefore, some potential fixes are:

将docker实例固定到docker compose文件中的特定MariaDB版本,以便其始终使用相同版本。
运行mysql_upgrade以确保数据目录已升级以匹配服务器版本。

Pinning the docker instance to a specific MariaDB version in the docker compose file, so that it consistently uses the same version. Running mysql_upgrade to ensure that the data directory is upgraded to match the server version.

如果要查看Docker问题以获取更多信息,请单击此处

If you want to See the docker issue for more information click here.

 sudo mv /Applications/XAMPP/xamppfiles/var/mysql/tc.log /Applications/XAMPP/xamppfiles/var/mysql/tc-old.log 

重新启动XAMPP或MySQL服务器 | 已解决

这篇关于MYSQL服务/数据库未在MAC中启动XAMPP-无消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆