1. Environmental statement
RHEL 6.4 x86_64 + mysql 5.5.37 and MySQL 5.6.19
Blog Address: http://blog.csdn.net/hw_libo/article/details/39215723
2. Case: Redo log file (ib_logfile) size parameter modified: innodb_log_file_size
Innodb_log_file_size = 256M--Modified to 200M
The version is 5.5 and fails to start, and the following error occurs:
InnoDB:Error:log file./ib_logfile0 is of different size 0 268435456 bytes # # Original redo log, Innodb:than specified in The. cnf file 0 209715200 bytes! # # Redo Log modified size 140912 0:01:12 [ERROR] Plugin ' InnoDB ' init function returned error.140912 0:01:12 [ERROR] Plugi N ' InnoDB ' registration as a STORAGE ENGINE failed.140912 0:01:12 [ERROR] unknown/unsupported STORAGE engine:innodb14 0912 0:01:12 [ERROR] Aborting
After the version is 5.6.16, normal start, will automatically delete the original redo log, and then regenerate the new redo log (this is more important):
2014-09-11 21:57:05 1093 [Warning] innodb:resizing redo log from 2*16384 to 2*12800 pages, lsn=712491712014-09-11 21:57:0 5 1093 [Warning] innodb:starting to delete and rewrite log files. # # Delete original redo log2014-09-11 21:57:05 1093 [Note] innodb:setting log file./ib_logfile101 size to $ mbinnodb:progress in M b:100 2002014-09-11 21:57:06 1093 [Note] innodb:setting log file./ib_logfile1 size to $ mbinnodb:progress in mb:100 2002014-09-11 21:57:07 1093 [Note] innodb:renaming log file./ib_logfile101 to./ib_logfile02014-09-11 21:57:07 1093 [Wa Rning] innodb:new log files created, lsn=71249171 # # New redo Log rebuild completed
Original redo log size: 2*16384*8 (page size is 8k)/1024=256MB
New redo log Size: 2*12800*8/1024=200MB
3. Case: Ibdata1 File size parameter modified: Innodb_data_file_path
(1) ibdata1 from big to small
Innodb_data_file_path = ibdata1:1g:autoextend--Modified to: Ibdata1:300m:autoextend
In versions 5.5 and 5.6, startup is normal, and there are no exceptions in the log. However, if the autoextend is removed, it will be error, start failure, such as: [Version: 5.5.37]
InnoDB:Error:data file./ibdata1 is of a different sizeinnodb:65536 pages (rounded-MB) Innodb:than specified in The. cnf file 19200 pages!140911 23:51:53 innodb:could not open or create data files.140911 23:51:53 innodb:if you trie D to add new data files, and it failed here,140911 23:51:53 innodb:you should now edit Innodb_data_file_path in My.cnf Ba ck140911 23:51:53 innodb:to What it is, and remove the new ibdata files InnoDB created140911 23:51:53 innodb:in this FA iled attempt. InnoDB only wrote those files full of140911 23:51:53 Innodb:zeros, and did not yet with them in any. But being careful:do not140911 23:51:53 innodb:remove old data files which contain your precious data!140911 23:51:53 [Erro R] Plugin ' InnoDB ' init function returned error.140911 23:51:53 [ERROR] Plugin ' InnoDB ' registration as a STORAGE ENGINE f ailed.140911 23:51:53 [ERROR] unknown/unsupported storage engine:innodb140911 23:51:53 [ERROR] Aborting the original ibdata1 size is: 65536*8*2/1024=1024m=1g current Ibdata1 was modified to: 19200*8*2/1024=300m
(2) Ibdata1 value of small change of large
Like what:
Innodb_data_file_path = ibdata1:1g:autoextend--Modified to: Ibdata1:1200m:autoextend
Then the following error will occur at startup:
In version 5.5: [Version: 5.5.37]
Innodb:error:auto-extending data File/ibdata1 is an different sizeinnodb:65536 pages (rounded down to MB) than spec Ified in the. CNF file:InnoDB:initial 76800 pages, max 0 (relevant if non-zero) pages!140911 23:57:43 innodb:could not O Pen or create data files.140911 23:57:43 innodb:if you tried to add new data files, and it failed here,140911 23:57:43 in Nodb:you should now edit Innodb_data_file_path in my.cnf back140911 23:57:43 innodb:to What it was, and remove the new I bdata files InnoDB created140911 23:57:43 innodb:in this failed attempt. InnoDB only wrote those files full of140911 23:57:43 Innodb:zeros, and did not yet with them in any. But being careful:do not140911 23:57:43 innodb:remove old data files which contain your precious data!140911 23:57:43 [Erro R] Plugin ' InnoDB ' init function returned error.140911 23:57:43 [ERROR] Plugin ' InnoDB ' registration as a STORAGE ENGINE f ailed.140911 23:57:43 [ERROR] unknown/unsupported storage engine:innodb140911 23:57:43 [ERROR] Aborting
In version 5.6: [Version: 5.6.19]
2014-09-11 22:20:01 1222 [ERROR] innodb:auto-extending data file./ibdata1 are of a different size 65536 pages (rounded do WN to MB) than specified in the. CNF file:initial 76800 pages, max 0 (relevant if non-zero) pages!2014-09-11 22:20:01 122 2 [ERROR] innodb:could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit Innodb_data_file_path In my.cnf back to what it is, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, and did not yet with them in any. But is careful:do not remove old data files which contain your precious data!2014-09-11 22:20:01 1222 [ERROR] Plugin ' Inn ODB ' init function returned error.2014-09-11 22:20:01 1222 [ERROR] Plugin ' InnoDB ' registration as a STORAGE ENGINE failed .2014-09-11 22:20:01 1222 [ERROR] unknown/unsupported storage engine:innodb2014-09-11 22:20:01 1222 [ERROR] Aborting
The original ibdata1 size is: 65536*8*2/1024=1024m=1g
The current ibdata1 is modified to: 76800*8*2/1024=1200m
Blog Address: http://blog.csdn.net/hw_libo/article/details/39215723
--Bosco qq:375612082
----END----
-------------------------------------------------------------------------------------------------------
Copyright, the article allows reprint, but must be linked to the source address, otherwise investigate legal responsibility!
After the Ib_logfile and ibdata1 parameter sizes are modified in MySQL