1. 在配置文件里面注释掉skip-innodb
2.删文件:
关闭mysql程序。打开mysql/data目录, 将图中的三个文件删掉。
3.更改默认引擎
打开mysql/bin目录下的my.ini,将default-strorage-engine=改为INNODB,若没有这一句则直接加入default-strorage-engine=INNODB。
4.重启mysql服务器
结果还没好,看了一下错误日志:
190421 17:57:36 [Warning] Using unique option prefix myisam_recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
190421 17:57:36 [Note] Plugin 'FEDERATED' is disabled.
190421 17:57:36 InnoDB: The InnoDB memory heap is disabled
190421 17:57:36 InnoDB: Mutexes and rw_locks use Windows interlocked functions
190421 17:57:36 InnoDB: Compressed tables use zlib 1.2.3
190421 17:57:36 InnoDB: Initializing buffer pool, size = 2.0G
InnoDB: VirtualAlloc(2175795200 bytes) failed; Windows error 8
190421 17:57:36 InnoDB: Completed initialization of buffer pool
190421 17:57:36 InnoDB: Fatal error: cannot allocate memory for the buffer pool
190421 17:57:36 [ERROR] Plugin 'InnoDB' init function returned error.
190421 17:57:36 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
190421 17:57:36 [ERROR] Unknown/unsupported storage engine: innodb
190421 17:57:36 [ERROR] Aborting
这是说配置的 innodb_buffer_pool_size = 2G太大了,内存不够了,改为1G,重启服务器就ok了。