后来在做WordPress,一开始还不知道原来WordPress用的是InnoDB数据引擎,于是在原来的数据库里面就建了一个数据库,一开始也没发觉问题,安装,导入sql,都没问题,当时也没多想。直到这几天因为又要装多一个WordPress,用phpmyadmin访问数据库多一点,问题来了。老是一访问WordPress的数据库,就弹出错误提示“Mysqld-nt.exe应用程序错误:“0x005346c4”指令引用的“0x00786000”内存,该内存不能为读...”,然后就MySQL服务也停了,登录不了,整个数据库都访问不了。

图1 设置数据库类型

纠结了挺久,也忘了是看到什么文章触发了灵感,反正后来才知道原来是数据引擎不同惹的祸。于是就想到重新版运行次设置向导,把数据库类型改成支持InnoDB引擎的。马上行动,在向导里设置数据库类型(也就是图1的database usage)那里,设置成第二项,还在后面的InnoDB Tablespace Settings里把InnoDB数据文件设置放在D:\MySQL InnoDB Datafiles目录里。但是在最后execute执行的时候,却老是在Start Service那里出问题,如下图2。

图2 Start service出错

想直接到services.msc里面启动服务,也不行。错误提示内容为:“在 本地计算机 无法启动mysql服务 错误1067:进程意外中止。”

按照网上的某些做法,卸载了MySQL服务,也没重启就重新版设置,问题如故;把服务卸载了,重启后再重新版设置,则是启动服务成功,但是在后面的Applying Security Settings的时候有新版的问题,如下图3。图2那里的错误提示则变成“ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)", 介绍MySQL还是没有启动,或者启动过,出错又关了。

图3

顺便提一下,在MySQL5里(其他版本的我不知道)每运行一次设置向导,只要按了execute执行,都会在MySQL5的安装目录下自动生成一个原来的MySQL的设置文件my.ini的备份bak文件。并且将以改的时间命名。因此如果设置出了问题,可以从备份文件恢复。

后来还是在错误日志里找到思路。错误日志就是放在 MySQL5安装目录\Data 目录里的那个以你的计算机名命名的.err文件。

首先我找到以下一段:

InnoDB: Error: log file .\ib_logfile0 is of different size 0 52428800 bytes

InnoDB: than specified in the .cnf file 0 10485760 bytes!

101001 9:47:42 [ERROR] Default storage engine (InnoDB) is not available

101001 9:47:42 [ERROR] Aborting

101001 9:47:42 [Note] D:\MySQL5\bin\mysqld-nt: Shutdown complete

于是就到“MySQL5安装目录\Data ”目录里把ib_logfile0日志文件删掉,重启MySQL服务,还是提示10067错误。再去查看err文件。

101001 18:39:29 InnoDB: Log file .\ib_logfile0 did not exist: new to be created

InnoDB: Setting log file .\ib_logfile0 size to 109 MB

InnoDB: Database physically writes the file full: wait...

InnoDB: Progress in MB: 100

InnoDB: Error: log file .\ib_logfile1 is of different size 0 52428800 bytes

InnoDB: than specified in the .cnf file 0 114294784 bytes!

101001 18:39:30 [ERROR] Default storage engine (InnoDB) is not available

101001 18:39:30 [ERROR] Aborting

101001 18:39:30 [Note] D:\MySQL5\bin\mysqld-nt: Shutdown complete

可以看到,ib_logfile0的问题解决了,但是同样的问题却出在ib_logfile1上面了。于是依样画葫芦,把ib_logfile1删了,再重启MySQL服务,却发现没用。难道是还要重启系统。果真,把前面两个ib_logfile删了,重启系统就搞定了。前面的可能是因为刚开机,所以也行。实际上是需要重启系统的。这时的日志如下

101001 19:19:24 InnoDB: Log file .\ib_logfile0 did not exist: new to be created

InnoDB: Setting log file .\ib_logfile0 size to 109 MB

InnoDB: Database physically writes the file full: wait...

InnoDB: Progress in MB: 100

101001 19:19:26 InnoDB: Log file .\ib_logfile1 did not exist: new to be created

InnoDB: Setting log file .\ib_logfile1 size to 109 MB

InnoDB: Database physically writes the file full: wait...

InnoDB: Progress in MB: 100

InnoDB: Cannot initialize created log files because

InnoDB: data files are corrupt, or new data files were

InnoDB: created when the database was started previous

InnoDB: time but the database was not shut down

InnoDB: normally after that.

101001 19:19:27 [ERROR] Default storage engine (InnoDB) is not available

101001 19:19:27 [ERROR] Aborting

101001 19:19:27 [Note] D:\MySQL5\bin\mysqld-nt: Shutdown complete

好了,现在只剩下最后一个问题了Default storage engine (InnoDB) is not available。去services.msc里面启动MySQL服务,还是出错。但是日志却是显示

InnoDB: No valid checkpoint found.

InnoDB: If this error appears when you are creating an InnoDB database,

InnoDB: the problem may be that during an earlier attempt you managed

InnoDB: to create the InnoDB data files, but log file creation failed.

InnoDB: If that is the case, please refer to

InnoDB: http://dev.mysql.com/doc/mysql/en/Error_creating_InnoDB.html

101001 20:45:09 [ERROR] Default storage engine (InnoDB) is not available

101001 20:45:09 [ERROR] Aborting

101001 20:45:09 [Note] D:\MySQL5\bin\mysqld-nt: Shutdown complete

于是去网上搜索了一下,发现提示No valid checkpoint found.的解决办法:删除所有现有的ibdataN和ib_logfileN文件后,重启Mysql。于是照做,果然行了。

InnoDB: The first specified data file D:\MySQL InnoDB Datafiles\ibdata1 did not exist:

InnoDB: a new database to be created!

101001 21:04:24 InnoDB: Setting file D:\MySQL InnoDB Datafiles\ibdata1 size to 10 MB

InnoDB: Database physically writes the file full: wait...

101001 21:04:25 InnoDB: Log file .\ib_logfile0 did not exist: new to be created

InnoDB: Setting log file .\ib_logfile0 size to 109 MB

InnoDB: Database physically writes the file full: wait...

InnoDB: Progress in MB: 100

101001 21:04:27 InnoDB: Log file .\ib_logfile1 did not exist: new to be created

InnoDB: Setting log file .\ib_logfile1 size to 109 MB

InnoDB: Database physically writes the file full: wait...

InnoDB: Progress in MB: 100

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

101001 21:04:31 InnoDB: Started; log sequence number 0 0

101001 21:04:32 [Note] D:\MySQL5\bin\mysqld-nt: ready for connections.

Version: '5.0.18-nt' socket: '' port: 3306 MySQL Community Edition (GPL)

奋斗了一天,总算成功地把MySQL从MyISAM转换成InnoDB引擎了。也学会了读懂错误日志文件err文件了。不过我就在想了,如果从一开始就按照上面的做,不知道会如何样呢?

转自 DarkBlue blog

mysql中non用什么_mysql Non-Transactional Database Only(只支持MyISAM)相关推荐

  1. 10067mysql_MYSQL数据库mysql Non-Transactional Database Only(只支持MyISAM)

    <MYSQL数据库mysql Non-Transactional Database Only(只支持MyISAM)>要点: 本文介绍了MYSQL数据库mysql Non-Transacti ...

  2. mysql的char在java中表示为_Java学习篇之-Mysql中varchar门类总结_mysql

    java学习篇之---mysql中varchar类型总结 Mysql中varchar类型总结 今天新做一个项目,需要自己进行数据库设计,发现自己对varchar的用法还不是很熟悉,所以查阅资料总结若下 ...

  3. mysql中正则表达式的用法_Mysql中正则表达式Regexp常见用法

    Mysql中Regexp常见用法 模糊匹配,包含特定字符串 # 查找content字段中包含"车友俱乐部"的记录 select * from club_content where ...

  4. mysql中关系怎么弄_mysql数据库关系操作

    ### mysql数据库 #### 知识要点: 1. 数据操作增.删.改 2. 外键约束要求 3. 一对多表关系 4. 一对一表关系 5. 多对多表关系 6. 外键约束的参照操作 ### 数据操作 # ...

  5. mysql中拼接用什么_MySQL中常用的拼接语句的小结(代码示例)

    本篇文章给大家带来的内容是关于MySQL中常用的拼接语句的小结(代码示例),有一定的参考价值,有需要的朋友可以参考一下,希望对你有所帮助. 前言:在MySQL中 CONCAT ()函数用于将多个字符串 ...

  6. mysql中所有时间类型_MySQL 中的日期时间类型

    INSERT INTO todo (title,created_on) VALUES ('blah','2019-09-31'); ERROR 1292 (22007): Incorrect date ...

  7. mysql中describe怎么用_MySQL中describe命令的使用方法小结

    MySQL中describe命令的使用方法小结 一.describe命令用于查看特定表的详细设计信息 例如为了查看guestbook表的设计信息,可用:describe guestbook descr ...

  8. mysql中设置字符集语句_mysql设置字符集

    一般情况下,防止程序交互过程中出现乱码情况,所以前后台都会同意编码格式. 因为UTF-8编码方式国际通用,所以我在mysql中设置编码格式UTF-8. 先查看mysql编码格式. show varia ...

  9. mysql中uuid的写法_MySQL IS_UUID()用法及代码示例

    MySQL中的此函数用于检查给定的通用唯一标识符(UUID)是否有效.如果参数是有效的string-format UUID,则返回1:如果参数不是有效的UUID,则返回0:如果参数为NULL,则返回N ...

最新文章

  1. ubuntu安装wkhtmltopdf
  2. php 发送表格,PHP邮件表格,带有使用AJAX发送的单选按钮
  3. JVM_04 对象的实例化+内存布局+访问定位+直接内存
  4. IDEA中安装配置Jrebel热部署插件用法笔记
  5. .NET6之MiniAPI(二十三):Refit
  6. 飞鸽传书2011绿色版简单性
  7. Windbg分析dump及调试程序
  8. 解析HttpURLConnection与代理服务器
  9. 创建一个JFrame,可下拉选择显示字符串和图片
  10. 【PL/SQL】九九乘法口诀表
  11. VMWareStation10 密钥
  12. 【专题5: 硬件设计】 之 【62.案例四:简易空气净化器,完整原理图】
  13. 两步教你在安卓中快速使用矢量图
  14. 随机打乱数据的几种方式
  15. [Pixhawk] ardupilot源码windows编译教程
  16. Qt5学习之位置函数
  17. 线上知识付费潮流中的青年人:寻找消费与求知的平衡点
  18. 求矩阵中非零元素个数(L0范式)
  19. php GD库做水印功能,合并图片
  20. python统计元音字母个数_计算Python中的元音(Counting vowels in python)

热门文章

  1. 2021年高考成绩查询襄阳状元,大胆猜测一下,2021年高考,湖北省文理状元会花落谁家?...
  2. 如何根据灰度直方图计算标准差_如何根据电器功率计算电线的粗细?
  3. python逻辑量有什么_Python中的逻辑运算符有什么?
  4. php 结构体_【开发规范】PHP编码开发规范下篇:PSR-2编码风格规范
  5. halcon/c++接口基础 之 构造函数与Halcon算子
  6. Android7.0占用空间,Android7.0 开发者注意事项
  7. AspectJ——AOP框架快速入门
  8. BZOJ3435[Wc2014]紫荆花之恋——动态点分治(替罪羊式点分树套替罪羊树)
  9. 网站如何集成百度UEditor编辑器
  10. 【短语学习】盈余量分析(earned value analysis)