我在Windows 8(64位)上安装了XAMPP。在XAMPP控制面板中,我无法启动mySQL。我根据该链接将“C:/xampp/mysql/bin/my.ini”中的mySQl端口从3306更改为3307:
现在“my.ini”中的代码更改为:
[client]
# password = your_password
port = 3307
socket = "C:/xampp/mysql/mysql.sock"
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
port= 3307
socket = "C:/xampp/mysql/mysql.sock"
现在它仍然会出现错误:
11:31:48 AM [mysql] Attempting to start MySQL service...
11:31:56 AM [mysql] Status change detected: running
11:32:01 AM [mysql] Status change detected: stopped
11:32:01 AM [mysql] Error: MySQL shutdown unexpectedly.
11:32:01 AM [mysql] This may be due to a blocked port, missing dependencies,
11:32:01 AM [mysql] improper privileges, a crash, or a shutdown by another method.
11:32:01 AM [mysql] Press the Logs button to view error logs and check
11:32:01 AM [mysql] the Windows Event Viewer for more clues
11:32:01 AM [mysql] If you need more help, copy and post this
11:32:01 AM [mysql] entire log window on the forums
我删除了“C:\ xampp \ mysql \ data”中的“ibdata1”文件。
也停止了mysql56服务。
感谢任何帮助。谢谢
答案 0 :(得分:1)
检查错误日志以查看有关该主题的更多详细信息。检查mysql
和mysqli
以及my.ini
中的php.ini
和config.inc.php
端口选项是否匹配且3307
。
如果MySQL
服务器崩溃,您可能需要查看Forcing InnoDB Recovery
此外,如果是第三方软件问题,请查看此solution。
答案 1 :(得分:0)
就像@Peter所说,你需要改变那个文件配置。
尝试在您的xampp文件夹中更改此内容:C:\xampp\php\php.ini
:
mysql.default_port=3307
mysqli.default_port=3307
并在xampp文件夹中更改此参数:C:\xampp\mysql\bin\my.ini
:
[client]
# password = your_password
port = 3307
socket = "C:/xampp/mysql/mysql.sock"
[mysqld]
port= 3307
答案 2 :(得分:0)
要解决此问题,
这确实有效!