最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

mysql Non-Transactional Database Only(只支持MyISAM)

 更新時間:2016年04月16日 18:09:21   投稿:mdxy-dxy  
按照discuz官方的建議,選的都是Non-Transactional Database Only 只支持MyISAM,其實(shí)默認(rèn)都安裝也挺好

后來在做WordPress,一開始還不知道原來WordPress用的是InnoDB數(shù)據(jù)引擎,于是在原來的數(shù)據(jù)庫里面就建了一個數(shù)據(jù)庫,一開始也沒發(fā)覺問題,安裝,導(dǎo)入sql,都沒問題,當(dāng)時也沒多想。直到這幾天因?yàn)橛忠b多一個WordPress,用phpmyadmin訪問數(shù)據(jù)庫多一點(diǎn),問題來了。老是一訪問WordPress的數(shù)據(jù)庫,就彈出錯誤提示“Mysqld-nt.exe應(yīng)用程序錯誤:“0x005346c4”指令引用的“0x00786000”內(nèi)存,該內(nèi)存不能為讀...”,然后就MySQL服務(wù)也停了,登陸不了,整個數(shù)據(jù)庫都訪問不了。

MySQL從MyISAM轉(zhuǎn)換成InnoDB錯誤和解決辦法 - DarkBlue - DarkBlue Log

圖1 設(shè)置數(shù)據(jù)庫類型

糾結(jié)了挺久,也忘了是看到什么文章觸發(fā)了靈感,反正后來才知道原來是數(shù)據(jù)引擎不同惹的禍。于是就想到重新運(yùn)行次設(shè)置向?qū)В褦?shù)據(jù)庫類型改成支持InnoDB引擎的。馬上行動,在向?qū)Ю镌O(shè)置數(shù)據(jù)庫類型(也就是圖1的database usage)那里,設(shè)置成第二項(xiàng),還在后面的InnoDB Tablespace Settings里把InnoDB數(shù)據(jù)文件設(shè)置放在D:\MySQL InnoDB Datafiles目錄里。但是在最后execute執(zhí)行的時候,卻老是在Start Service那里出問題,如下圖2。

MySQL從MyISAM轉(zhuǎn)換成InnoDB錯誤和解決辦法 - DarkBlue - DarkBlue Log

圖2 Start service出錯

想直接到services.msc里面啟動服務(wù),也不行。錯誤提示內(nèi)容為:“在 本地計算機(jī) 無法啟動mysql服務(wù) 錯誤1067:進(jìn)程意外中止。

按照網(wǎng)上的某些做法,卸載了MySQL服務(wù),也沒重啟就重新設(shè)置,問題如故;把服務(wù)卸載了,重啟后再重新設(shè)置,則是啟動服務(wù)成功,但是在后面的Applying Security Settings的時候有新的問題,如下圖3。圖2那里的錯誤提示則變成“ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)", 說明MySQL還是沒有啟動,或者啟動過,出錯又關(guān)了。

MySQL從MyISAM轉(zhuǎn)換成InnoDB錯誤和解決辦法 - DarkBlue - DarkBlue Log

圖3

順便提一下,在MySQL5里(其他版本的我不知道)每運(yùn)行一次設(shè)置向?qū)?,只要按了execute執(zhí)行,都會在MySQL5的安裝目錄下自動生成一個原來的MySQL的設(shè)置文件my.ini的備份bak文件。并且將以修改的時間命名。因此如果設(shè)置出了問題,可以從備份文件恢復(fù)。


后來還是在錯誤日志里找到思路。錯誤日志就是放在 MySQL5安裝目錄\Data 目錄里的那個以你的計算機(jī)名命名的.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服務(wù),還是提示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服務(wù),卻發(fā)現(xiàn)沒用。難道是還要重啟系統(tǒng)。果真,把前面兩個ib_logfile刪了,重啟系統(tǒng)就搞定了。前面的可能是因?yàn)閯傞_機(jī),所以也行。實(shí)際上是需要重啟系統(tǒng)的。這時的日志如下

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


好了,現(xiàn)在只剩下最后一個問題了Default storage engine (InnoDB) is not available。去services.msc里面啟動MySQL服務(wù),還是出錯。但是日志卻是顯示

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


于是去網(wǎng)上搜索了一下,發(fā)現(xiàn)提示No valid checkpoint found.的解決辦法:刪除所有現(xiàn)有的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轉(zhuǎn)換成InnoDB引擎了。也學(xué)會了讀懂錯誤日志文件err文件了。不過我就在想了,如果從一開始就按照上面的做,不知道會怎么樣呢?
轉(zhuǎn)自 DarkBlue blog

相關(guān)文章

  • MySQL數(shù)據(jù)延遲跳動的問題解決

    MySQL數(shù)據(jù)延遲跳動的問題解決

    這篇文章主要介紹了MySQL數(shù)據(jù)延遲跳動的問題如何解決,幫助大家更好的理解和學(xué)習(xí)MySQL,感興趣的朋友可以了解下
    2020-08-08
  • mysql執(zhí)行計劃Explain解讀

    mysql執(zhí)行計劃Explain解讀

    在數(shù)據(jù)庫操作中,理解Explain執(zhí)行計劃對于性能優(yōu)化至關(guān)重要,Explain展示了MySQL如何執(zhí)行查詢,包括選擇哪些索引,如何連接表,以及估計的行數(shù)等,Select類型、訪問表的方式、使用的索引、以及額外的執(zhí)行信息,都是優(yōu)化查詢時需要考慮的因素
    2024-10-10
  • Mysql跨表更新 多表update sql語句總結(jié)

    Mysql跨表更新 多表update sql語句總結(jié)

    Mysql跨表更新一直是大家所關(guān)心的話題,本文介紹mysql多表 update在實(shí)踐中幾種不同的寫法,需要的朋友可以參考下
    2012-12-12
  • MySQL找出未提交事務(wù)的SQL實(shí)例淺析

    MySQL找出未提交事務(wù)的SQL實(shí)例淺析

    這篇文章主要給大家介紹了關(guān)于MySQL找出未提交事務(wù)SQL的相關(guān)資料,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2020-12-12
  • mysql5.7 生成列 generated column用法實(shí)例分析

    mysql5.7 生成列 generated column用法實(shí)例分析

    這篇文章主要介紹了mysql5.7 生成列 generated column用法,結(jié)合實(shí)例形式分析了mysql5.7 生成列 generated column基本原理、用法及操作注意事項(xiàng),需要的朋友可以參考下
    2020-02-02
  • 將MySQL help contents的內(nèi)容有層次的輸出方法推薦

    將MySQL help contents的內(nèi)容有層次的輸出方法推薦

    如何將MySQL help contents的內(nèi)容有層次的輸出呢?下面小編就為大家?guī)硪黄獙ySQL help contents的內(nèi)容有層次的輸出方法推薦。小編覺得挺不錯的,現(xiàn)在分享給大家,給大家一個參考。一起跟隨小編過來看看吧
    2016-03-03
  • MySQL優(yōu)化表時提示 Table is already up to date的解決方法

    MySQL優(yōu)化表時提示 Table is already up to date的解決方法

    這篇文章主要介紹了MySQL優(yōu)化表時提示 Table is already up to date的解決方法,需要的朋友可以參考下
    2016-11-11
  • mysql 8.0.15 壓縮版安裝圖文教程

    mysql 8.0.15 壓縮版安裝圖文教程

    這篇文章主要為大家詳細(xì)介紹了mysql 8.0.15 壓縮版安裝圖文教程,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2019-03-03
  • Mysql分庫分表實(shí)現(xiàn)方式

    Mysql分庫分表實(shí)現(xiàn)方式

    這篇文章詳細(xì)介紹了分庫分表的概念,原因,如何實(shí)現(xiàn),以及不同中間件的優(yōu)缺點(diǎn),同時,也介紹了如何進(jìn)行數(shù)據(jù)遷移和擴(kuò)容縮容,以及如何處理分庫分表后的ID和事務(wù)問題
    2025-02-02
  • 解決mysql導(dǎo)入還原時亂碼的問題

    解決mysql導(dǎo)入還原時亂碼的問題

    sql文件,直接記事本方式打開,中文顯示正常,還原導(dǎo)入后,發(fā)現(xiàn)中文是亂碼
    2012-12-12

最新評論

景德镇市| 桐城市| 昌黎县| 鲜城| 河源市| 怀宁县| 凤阳县| 乌审旗| 安西县| 黑水县| 清涧县| 瑞昌市| 克山县| 中山市| 张掖市| 宁德市| 阿巴嘎旗| 永昌县| 毕节市| 思茅市| 晋江市| 盐津县| 新巴尔虎左旗| 龙胜| 乡城县| 石景山区| 通化县| 汝南县| 白水县| 社旗县| 河源市| 长丰县| 六盘水市| 密山市| 白玉县| 兴义市| 嘉善县| 太湖县| 威远县| 绵竹市| 合川市|