本文主要向大家介绍了MySQL数据库之MYSQL无法启动解决方法 ,通过具体的内容向大家展现,希望对大家学习MySQL数据库有所帮助。
在my.ini(linux下/etc/f)加上skip-innodb,就可以了。
我这样设置后,在linux下都没问题,今天在我本机winXP启动MYSQL,提示启动不起来。看下mysql目录的错误日志:
引用
09061310:15:27[ERROR]Defaultstorageengine(InnoDB)isnotavailable
09061310:15:27[ERROR]Aborting
09061310:15:27[Note]C:wwwmysqlinmysqld-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:wwwmysqlinmysqld-nt:readyforconnections.
再删除这三个文件,加了skip-innodb后,启动日志:
引用
09061310:30:12[Note]C:wwwmysqlinmysqld-nt:Normalshutdown
09061310:30:12[Note]C:wwwmysqlinmysqld-nt:Shutdowncomplete
09061310:30:17[Note]C:wwwmysqlinmysqld-nt:readyforconnections.
Version:'5.0.45'socket:''port:3306Sourcedistribution
那三个文件就不会自动产生了。
本文由职坐标整理并发布,希望对同学们学习MySQL有所帮助,更多内容请关注职坐标数据库MySQL数据库频道!