安装Xampp中启动MySql服务时出错

时间:2014-10-10 09:33:50

标签: mysql apache xampp

我已安装Apache并在端口80中启动Apache服务。但是在启动Apache服务后,MySql服务无法启动并给我这个错误:

11:53:47 AM  [mysql]    Attempting to start MySQL service...
11:53:47 AM  [mysql]    Status change detected: running
11:53:53 AM  [mysql]    Status change detected: stopped
11:53:53 AM  [mysql]    Error: MySQL shutdown unexpectedly.
11:53:53 AM  [mysql]    This may be due to a blocked port, missing dependencies, 
11:53:53 AM  [mysql]    improper privileges, a crash, or a shutdown by another method.
11:53:53 AM  [mysql]    Press the Logs button to view error logs and check
11:53:53 AM  [mysql]    the Windows Event Viewer for more clues
11:53:53 AM  [mysql]    If you need more help, copy and post this
11:53:53 AM  [mysql]    entire log window on the forums

所以我在日志文件中复制了错误:

2014-10-06 19:42:58 6820 [ERROR] Can't start server: Bind on TCP/IP port: No such file or      directory
2014-10-06 19:42:58 6820 [ERROR] Do you already have another mysqld server running on port: 3306 ?

2014-10-06 19:42:58 6820 [ERROR] Aborting

2014-10-06 19:49:17 3392 [ERROR] Can't start server: Bind on TCP/IP port: No such file or directory
2014-10-06 19:49:17 3392 [ERROR] Do you already have another mysqld server running on port: 3306 ?
2014-10-06 19:49:17 3392 [ERROR] Aborting
2014-10-06 19:55:59 6260 [ERROR] InnoDB: Cannot create D:\xampp1\mysql\data\ib_logfile1
2014-10-06 19:55:59 6260 [ERROR] Plugin 'InnoDB' init function returned error.
2014-10-06 19:55:59 6260 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2014-10-06 19:55:59 6260 [ERROR] Unknown/unsupported storage engine: InnoDB
2014-10-06 19:55:59 6260 [ERROR] Aborting
2014-10-06 19:57:45 7920 [ERROR] InnoDB: space header page consists of zero bytes in data file D:\xampp1\mysql\data\ibdata1
2014-10-06 19:57:45 7920 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!
2014-10-06 19:57:45 7920 [ERROR] Plugin 'InnoDB' init function returned error.
2014-10-06 19:57:45 7920 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2014-10-06 19:57:45 7920 [ERROR] Unknown/unsupported storage engine: InnoDB
2014-10-06 19:57:45 7920 [ERROR] Aborting
2014-10-06 19:57:58 6240 [ERROR] InnoDB: space header page consists of zero bytes in data file D:\xampp1\mysql\data\ibdata1
2014-10-06 19:57:58 6240 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!
2014-10-06 19:57:58 6240 [ERROR] Plugin 'InnoDB' init function returned error.
2014-10-06 19:57:58 6240 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2014-10-06 19:57:58 6240 [ERROR] Unknown/unsupported storage engine: InnoDB
2014-10-06 19:57:58 6240 [ERROR] Aborting
2014-10-06 21:10:22 5612 [ERROR] InnoDB: space header page consists of zero bytes in data file D:\xampp1\mysql\data\ibdata1
2014-10-06 21:10:22 5612 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!
2014-10-06 21:10:22 5612 [ERROR] Plugin 'InnoDB' init function returned error.
2014-10-06 21:10:22 5612 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2014-10-06 21:10:22 5612 [ERROR] Unknown/unsupported storage engine: InnoDB
2014-10-06 21:10:22 5612 [ERROR] Aborting

....... ......

请帮我安装这个Web服务器。 感谢

3 个答案:

答案 0 :(得分:4)

停止其他mysql服务

打开C:\xampp\mysql\bin\my.ini然后更改端口

...
[mysqld]
port= 3306    <----- change to another port number
...

答案 1 :(得分:0)

答案 2 :(得分:0)

Apache使用端口80,并且该端口已在您的系统中使用(可能您使用的是Skype)。 要启动Apache,请在系统中释放端口80。 (从skype或使用端口80的其他程序退出)。然后再试一次。