[英]XAMPP: MySQL not starting
I was in the middle of developing my site and both apache and mysql were running normally until suddenly, the database failed to connect. 我正处于开发站点的过程中,apache和mysql都正常运行,直到突然之间,数据库无法连接。 I checked my XAMPP control panel and MySQL had stopped running.
我检查了XAMPP控制面板,MySQL停止运行。 I searched for a solution here and some other similar questions on SO but i haven't been able to find a solution that works for me.
我在这里搜索了一个解决方案以及关于SO的其他一些类似问题,但是我一直没有找到适合我的解决方案。 Here is the contents of mysql_error.log file:
这是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
What i have tried until now: 到目前为止我尝试过的是:
Why did MySQL suddenly run into problems and and how to start MySQL without losing my tables? 为什么MySQL突然遇到问题,以及如何在不丢失表的情况下启动MySQL?
There are several reason MySql keeps shutting down unexpectedly. MySql一直意外关闭的原因有很多。
I am assuming that you have not installed multiple mysql server versions in the same machine. 我假设您尚未在同一台计算机上安装多个mysql服务器版本。
I also see your innodb_buffer_pool_size is very low. 我还看到您的innodb_buffer_pool_size非常低。
Increase the buffer_pool_size to about 50-60% of your RAM. 将buffer_pool_size增加到大约RAM的50-60%。 For example, If you have 2GB ram, then set buffer_pool_size= 1GB
例如,如果您有2GB内存,则将buffer_pool_size = 1GB
run this query in mysql. 在mysql中运行此查询。
set innodb_buffer_pool_size=1073741824;
or 要么
set global innodb_buffer_pool_size=1073741824;
restart mysql server. 重启mysql服务器。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.