mysql InnoDB数据无法启动解决办法
2019/10/10/17:32:49 阅读:2021 来源:谷歌SEO算法 标签:
挖矿
在my.ini(linux下/etc/my.cnf)加上skip-innodb,就可以了, 我这样设置后,在linux下都没问题,今天在我本机winXP启动MYSQL,提示启动不起来,看下mysql目录的错误日志,引用.
出现如下语句:The ‘InnoDB' feature is disabled; you need MySQL built with ‘InnoDB' to have it working;
是mysql教程配置文件禁掉了这个选项,关闭mysql数据库,在mysql的安装目录中找到my.ini文件,找到skip-innodb,在前面加上#号,保存,开启mysql数据库,搞定.
这也是开启Mysql数据库InnoDB功能的方法.
启动不解决方法:
- 09061310:15:27[ERROR]Defaultstorageengine(InnoDB)isnotavailable
- 09061310:15:27[ERROR]Aborting
- 09061310:15:27[Note]C:wwwmysqlbinmysqld-nt:Shutdowncomplete
估计是上次加了参数后,一直没启动起来,已经很久没用本机的MySQL了,查了下,原来my.ini里有一句:default-storage-engine=INNODB,把默认的engine设为INNODB,而我又加了skip-innodb,怪不得启不来了.
将default-storage-engine改为MYISAM,MYSQL启动OK,在skip-innodb下,data目录下的ibdata1,ib_logfile0,ib_logfile1这三个文件就不需要了,就可以删除.
测试了下,在没加skip-innodb时,删除了这三个文件,启动时会自动创建这三个文件,日志如下:
- 引用
- InnoDB:Thefirstspecifieddatafile.ibdata1didnotexist:
- InnoDB:anewdatabasetobecreated!
- 09061310:19:37InnoDB:Settingfile.ibdata1sizeto10MB
- InnoDB:Databasephysicallywritesthefilefull:wait...
- 09061310:19:37InnoDB:Logfile.ib_logfile0didnotexist:newtobecreated
- InnoDB:Settinglogfile.ib_logfile0sizeto24MB
- InnoDB:Databasephysicallywritesthefilefull:wait...
- 09061310:19:38InnoDB:Logfile.ib_logfile1didnotexist:newtobecreated
- InnoDB:Settinglogfile.ib_logfile1sizeto24MB
- InnoDB:Databasephysicallywritesthefilefull:wait...
- InnoDB:Doublewritebuffernotfound:creatingnew
- InnoDB:Doublewritebuffercreated
- InnoDB:Creatingforeignkeyconstraintsystemtables
- InnoDB:Foreignkeyconstraintsystemtablescreated
- 09061310:19:39InnoDB:Started;logsequencenumber00
- 09061310:19:39[Note]C:wwwmysqlbinmysqld-nt:readyforconnections.--phpfensi.com
再删除这三个文件,加了skip-innodb后,启动日志:
- 引用
- 09061310:30:12[Note]C:wwwmysqlbinmysqld-nt:Normalshutdown
- 09061310:30:12[Note]C:wwwmysqlbinmysqld-nt:Shutdowncomplete
- 09061310:30:17[Note]C:wwwmysqlbinmysqld-nt:readyforconnections.
- Version:'5.0.45'socket:''port:3306Sourcedistribution
热门评论