程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> MYSQL數據庫 >> MySQL綜合教程 >> mysql Non-Transactional Database Only(只支撐MyISAM)

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

編輯:MySQL綜合教程

mysql Non-Transactional Database Only(只支撐MyISAM)。本站提示廣大學習愛好者:(mysql Non-Transactional Database Only(只支撐MyISAM))文章只能為提供參考,不一定能成為您想要的結果。以下是mysql Non-Transactional Database Only(只支撐MyISAM)正文


後來在做WordPress,一開端還不曉得本來WordPress用的是InnoDB數據引擎,因而在本來的數據庫外面就建了一個數據庫,一開端也沒覺察成績,裝置,導入sql,都沒成績,其時也沒多想。直到這幾天由於又要裝多一個WordPress,用phpmyadmin拜訪數據庫多一點,成績來了。總是一拜訪WordPress的數據庫,就彈失足誤提醒“Mysqld-nt.exe運用法式毛病:“0x005346c4”指令援用的“0x00786000”內存,該內存不克不及為讀...”,然後就MySQL辦事也停了,上岸不了,全部數據庫都拜訪不了。

MySQL從MyISAM轉換成InnoDB錯誤和解決辦法 - DarkBlue - DarkBlue Log

圖1 設置數據庫類型

糾結了挺久,也忘了是看到甚麼文章觸發了靈感,橫豎後來才曉得本來是數據引擎分歧惹的禍。因而就想到從新運轉次設置領導,把數據庫類型改成支撐InnoDB引擎的。立時行為,在領導裡設置數據庫類型(也就是圖1的database usage)那邊,設置成第二項,還在前面的InnoDB Tablespace Settings裡把InnoDB數據文件設置放在D:\MySQL InnoDB Datafiles目次裡。然則在最初execute履行的時刻,卻總是在Start Service那邊出成績,以下圖2。

MySQL從MyISAM轉換成InnoDB錯誤和解決辦法 - DarkBlue - DarkBlue Log

圖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照樣沒有啟動,或許啟動過,失足又關了。

MySQL從MyISAM轉換成InnoDB錯誤和解決辦法 - DarkBlue - DarkBlue Log

圖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

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved