XAMPP:MySQL未启动 我正在开发我的站点,Apache和MySQL都正常运行,直到数据库突然连接失败。我检查了我的XAMPP控制面板,MySQL已经停止运行。我搜索了一个解决方案和其他一些类似的问题,但我没有找到一个适合我的解决方案。以下是mysql_error.log文件的内容: 2016-04-15 20:30:18 150c InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator. 160415 20:30:18 [Note] InnoDB: Using mutexes to ref count buffer pool pages 160415 20:30:18 [Note] InnoDB: The InnoDB memory heap is disabled 160415 20:30:18 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions 160415 20:30:18 [Note] InnoDB: Memory barrier is not used 160415 20:30:18 [Note] InnoDB: Compressed tables use zlib 1.2.3 160415 20:30:18 [Note] InnoDB: Not using CPU crc32 instructions 160415 20:30:18 [Note] InnoDB: Initializing buffer pool, size = 16.0M 160415 20:30:18 [Note] InnoDB: Completed initialization of buffer pool 160415 20:30:18 [Note] InnoDB: Restoring page 0 of tablespace 0 160415 20:30:18 [Warning] InnoDB: Doublewrite does not have page_no=0 of space: 0 160415 20:30:18 [ERROR] InnoDB: space header page consists of zero bytes in data file D:\xampp\mysql\data\ibdata1 160415 20:30:18 [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! 160415 20:30:18 [ERROR] Plugin 'InnoDB' init function returned error. 160415 20:30:18 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 160415 20:30:18 [Note] Plugin 'FEEDBACK' is disabled. 160415 20:30:18 [ERROR] Unknown/unsupported storage engine: InnoDB 160415 20:30:18 [ERROR] Aborting 160415 20:30:18 [Note] D:\xampp\mysql\bin\mysqld.exe: Shutdown complete

XAMPP:MySQL未启动 我正在开发我的站点,Apache和MySQL都正常运行,直到数据库突然连接失败。我检查了我的XAMPP控制面板,MySQL已经停止运行。我搜索了一个解决方案和其他一些类似的问题,但我没有找到一个适合我的解决方案。以下是mysql_error.log文件的内容: 2016-04-15 20:30:18 150c InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator. 160415 20:30:18 [Note] InnoDB: Using mutexes to ref count buffer pool pages 160415 20:30:18 [Note] InnoDB: The InnoDB memory heap is disabled 160415 20:30:18 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions 160415 20:30:18 [Note] InnoDB: Memory barrier is not used 160415 20:30:18 [Note] InnoDB: Compressed tables use zlib 1.2.3 160415 20:30:18 [Note] InnoDB: Not using CPU crc32 instructions 160415 20:30:18 [Note] InnoDB: Initializing buffer pool, size = 16.0M 160415 20:30:18 [Note] InnoDB: Completed initialization of buffer pool 160415 20:30:18 [Note] InnoDB: Restoring page 0 of tablespace 0 160415 20:30:18 [Warning] InnoDB: Doublewrite does not have page_no=0 of space: 0 160415 20:30:18 [ERROR] InnoDB: space header page consists of zero bytes in data file D:\xampp\mysql\data\ibdata1 160415 20:30:18 [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! 160415 20:30:18 [ERROR] Plugin 'InnoDB' init function returned error. 160415 20:30:18 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 160415 20:30:18 [Note] Plugin 'FEEDBACK' is disabled. 160415 20:30:18 [ERROR] Unknown/unsupported storage engine: InnoDB 160415 20:30:18 [ERROR] Aborting 160415 20:30:18 [Note] D:\xampp\mysql\bin\mysqld.exe: Shutdown complete,mysql,xampp,Mysql,Xampp,到目前为止,我一直在尝试: 我已将端口地址从3306更改为33073310。没用 我删除了ibdata1文件。尽管在我尝试重新启动MySQL后,该文件重新出现在原来的位置。(我后来了解到,如果ibdata1丢失,我将丢失我的表。我不希望这样。) 为什么MySQL突然出现问题,以及如何在不丢失表的情况下启动MySQL?MySQL一直意外关闭有几个原因 我假设您没有在同一台机器上安装多个mysql服务器版本 从xampp控制面板停止Mysql服务,或从services.msc手动停止Mysql服

到目前为止,我一直在尝试:

  • 我已将端口地址从3306更改为33073310。没用
  • 我删除了ibdata1文件。尽管在我尝试重新启动MySQL后,该文件重新出现在原来的位置。(我后来了解到,如果ibdata1丢失,我将丢失我的表。我不希望这样。)

为什么MySQL突然出现问题,以及如何在不丢失表的情况下启动MySQL?

MySQL一直意外关闭有几个原因

我假设您没有在同一台机器上安装多个mysql服务器版本

  • 从xampp控制面板停止Mysql服务,或从services.msc手动停止Mysql服务并退出xampp控制面板
  • 从xampp/mysql/目录中删除这两个日志文件(ib_logfile0和ib_logfile1)。(注意:我不确定日志文件的确切路径,请检查xampp/mysql/directory的所有文件夹)
  • 从services.msc手动重新启动Mysql服务
  • 打开xampp控制面板,您应该看到mysql正在运行
  • 我还看到您的innodb\u缓冲池\u池大小非常小

    将缓冲池大小增加到RAM的50-60%左右。例如,如果您有2GB ram,则将缓冲区\池\大小设置为1GB

    在mysql中运行此查询

    set innodb_buffer_pool_size=1073741824;
    

    重新启动mysql服务器

    set global innodb_buffer_pool_size=1073741824;