Default storage engine (InnoDB) is not available的解决方法

很文博客hinven.com 数据库评论473字数 1686阅读模式
广告也精彩

自己用的MYSQL都是用MYISAM数据库,还没涉及到需要INNODB,因此打算直接不加载INNODB引擎。

在my.ini(linux下/etc/my.cnf)加上skip-innodb,就可以了。文章源自很文博客https://www.hinven.com很文博客-https://www.hinven.com/17956.html

我这样设置后,在linux下都没问题,今天在我本机winXP启动MYSQL,提示启动不起来。看下mysql目录的错误日志:文章源自很文博客https://www.hinven.com很文博客-https://www.hinven.com/17956.html

引用文章源自很文博客https://www.hinven.com很文博客-https://www.hinven.com/17956.html

090613 10:15:27 [ERROR] Default storage engine (InnoDB) is not available文章源自很文博客https://www.hinven.com很文博客-https://www.hinven.com/17956.html

090613 10:15:27 [ERROR] Aborting文章源自很文博客https://www.hinven.com很文博客-https://www.hinven.com/17956.html

090613 10:15:27 [Note] C:\www\mysql\bin\mysqld-nt: Shutdown complete文章源自很文博客https://www.hinven.com很文博客-https://www.hinven.com/17956.html

估计是上次加了参数后,一直没启动起来。。。已经很久没用本机的mysql了。文章源自很文博客https://www.hinven.com很文博客-https://www.hinven.com/17956.html

查了下,原来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: The first specified data file .\ibdata1 did not exist:
InnoDB: a new database to be created!
090613 10:19:37 InnoDB: Setting file .\ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
090613 10:19:37 InnoDB: Log file .\ib_logfile0 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile0 size to 24 MB
InnoDB: Database physically writes the file full: wait...
090613 10:19:38 InnoDB: Log file .\ib_logfile1 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile1 size to 24 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
090613 10:19:39 InnoDB: Started; log sequence number 0 0
090613 10:19:39 [Note] C:\www\mysql\bin\mysqld-nt: ready for connections.

再删除这三个文件,加了skip-innodb后,启动日志:

引用

090613 10:30:12 [Note] C:\www\mysql\bin\mysqld-nt: Normal shutdown

090613 10:30:12 [Note] C:\www\mysql\bin\mysqld-nt: Shutdown complete

090613 10:30:17 [Note] C:\www\mysql\bin\mysqld-nt: ready for connections.

Version: '5.0.45' socket: '' port: 3306 Source distribution

那三个文件就不会自动产生了。

工具:作品在线观看

女优:最新作品观看

中文:国语在线观看

weinxin
我的微信
扫一扫更精彩
大家的支持是我更新的动力!!!
 
广告也精彩
匿名

发表评论

匿名网友
:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:
确定

拖动滑块以完成验证