gpt4 book ai didi

mysql - MySQL Xampp 中的错误

转载 作者:行者123 更新时间:2023-11-29 23:55:58 24 4
gpt4 key购买 nike

我已在使用端口 3306 的计算机上安装了 MySQL Workbench。

我安装了 Xampp apache 服务器。当我启动服务时出现此错误:

Problem detected!
Port 3306 in use by ""C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqld" --defaults- ile="C:\ProgramData\MySQL\MySQL Server 5.6\my.ini" MySQL56"! MySQL WILL NOT start without the configured ports free!
You need to uninstall/disable/reconfigure the blocking application or reconfigure MySQL and the Control Panel to listen on a different port

我通过以下方式更改了 xampp 的 mysql 端口:

停止 xampp 服务器(如果它已在运行)。在 xampp/mysql/bin/my.ini 中将值编辑为“port”代码:

Password = your_password   
port = 3306 ---> 3307
socket = "/ xampp / mysql / mysql.sock"

还有这里

代码:

The MySQL server 
[ mysqld ]
port = 3306 ---> 3307
socket = "/ xampp / mysql / mysql.sock"

并启动了 mysql 服务,但错误仍然存​​在。

有人可以帮我解决这个问题吗?

谢谢大家

最诚挚的问候

----------------------------MySQL_error.log---------------- -----------

140818 12:09:30 [Note] Plugin 'FEDERATED' is disabled.
140818 12:09:30 InnoDB: The InnoDB memory heap is disabled
140818 12:09:30 InnoDB: Mutexes and rw_locks use Windows interlocked functions
140818 12:09:30 InnoDB: Compressed tables use zlib 1.2.3
140818 12:09:30 InnoDB: Initializing buffer pool, size = 16.0M
140818 12:09:30 InnoDB: Completed initialization of buffer pool
InnoDB: Error: space header page consists of zero bytes in data file C:\xampp\mysql\data\ibdata1
140818 12:09:30 InnoDB: Could not open or create data files.
140818 12:09:30 InnoDB: If you tried to add new data files, and it failed here,
140818 12:09:30 InnoDB: you should now edit innodb_data_file_path in my.cnf back
140818 12:09:30 InnoDB: to what it was, and remove the new ibdata files InnoDB created
140818 12:09:30 InnoDB: in this failed attempt. InnoDB only wrote those files full of
140818 12:09:30 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
140818 12:09:30 InnoDB: remove old data files which contain your precious data!
140818 12:09:30 [ERROR] Plugin 'InnoDB' init function returned error.
140818 12:09:30 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
140818 12:09:30 [ERROR] Unknown/unsupported storage engine: InnoDB
140818 12:09:30 [ERROR] Aborting

140818 12:09:30 [Note] c:\xampp\mysql\bin\mysqld.exe: Shutdown complete

140818 12:21:45 [Note] Plugin 'FEDERATED' is disabled.
140818 12:21:45 InnoDB: The InnoDB memory heap is disabled
140818 12:21:45 InnoDB: Mutexes and rw_locks use Windows interlocked functions
140818 12:21:45 InnoDB: Compressed tables use zlib 1.2.3
140818 12:21:45 InnoDB: Initializing buffer pool, size = 16.0M
140818 12:21:45 InnoDB: Completed initialization of buffer pool
InnoDB: Error: space header page consists of zero bytes in data file C:\xampp\mysql\data\ibdata1
140818 12:21:45 InnoDB: Could not open or create data files.
140818 12:21:45 InnoDB: If you tried to add new data files, and it failed here,
140818 12:21:45 InnoDB: you should now edit innodb_data_file_path in my.cnf back
140818 12:21:45 InnoDB: to what it was, and remove the new ibdata files InnoDB created
140818 12:21:45 InnoDB: in this failed attempt. InnoDB only wrote those files full of
140818 12:21:45 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
140818 12:21:45 InnoDB: remove old data files which contain your precious data!
140818 12:21:45 [ERROR] Plugin 'InnoDB' init function returned error.
140818 12:21:45 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
140818 12:21:45 [ERROR] Unknown/unsupported storage engine: InnoDB
140818 12:21:45 [ERROR] Aborting

最佳答案

这听起来很像同时运行两个 MySQL 服务器。我建议您检查进程列表中是否有名为 mysqld.exe 的进程。 (您还可以检查控制面板提供的“Netstat”)这应该是您已经运行的 MySQL 服务器实例。不管你喜欢什么,结束那个,然后再试一次。

就你的情况而言,我还会考虑将 MySQL 服务器安装为 Windows 服务。这允许您“从外部”管理服务器并确保只有一个实例在运行。

您可以通过单击模块名称旁边的红色 x 并等待它变成绿色复选标记来完成此操作。

Control panel with apache and MySQL installed as Service

之后你的控制面板应该看起来像这样▲▲
我安装了 MySQL 和 Apache 作为服务,但这是你的偏好;)

然后,您可以配置 MySQL Workbench 以访问已运行的服务器,而不是启动自己的服务器。

在任何情况下都不应该要求您更改 MySQL 的端口。

除此之外,即使没有启动 MySQL,您的 Apache 模块也应该能够启动...

关于mysql - MySQL Xampp 中的错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25362092/

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