MySQL中ib_logfile和ibdata1参数大小被修改后_MySQL
1. 环境说明
RHEL 6.4 x86_64 + MySQL 5.5.37和MySQL 5.6.19
blog地址:http://blog.csdn.net/hw_libo/article/details/39215723
2. 案例:redo log文件(ib_logfile)大小参数被修改:innodb_log_file_size
innodb_log_file_size = 256M -- 修改为200M
版本是5.5的,启动失败,会出现如下错误:
InnoDB: Error: log file ./ib_logfile0 is of different size 0 268435456 bytes ## 原来redo log的大小 InnoDB: than specified in the .cnf file 0 209715200 bytes! ## redo log被修改的大小 140912 0:01:12 [ERROR] Plugin 'InnoDB' init function returned error. 140912 0:01:12 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 140912 0:01:12 [ERROR] Unknown/unsupported storage engine: InnoDB 140912 0:01:12 [ERROR] Aborting
2014-09-11 21:57:05 1093 [Warning] InnoDB: Resizing redo log from 2*16384 to 2*12800 pages, LSN=71249171 2014-09-11 21:57:05 1093 [Warning] InnoDB: Starting to delete and rewrite log files. ## 删除原redo log 2014-09-11 21:57:05 1093 [Note] InnoDB: Setting log file ./ib_logfile101 size to 200 MB InnoDB: Progress in MB: 100 200 2014-09-11 21:57:06 1093 [Note] InnoDB: Setting log file ./ib_logfile1 size to 200 MB InnoDB: Progress in MB: 100 200 2014-09-11 21:57:07 1093 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0 2014-09-11 21:57:07 1093 [Warning] InnoDB: New log files created, LSN=71249171 ## 新redo log重建完毕
新redo log大小:2*12800*8/1024=200MB
3. 案例:ibdata1文件大小参数被修改:innodb_data_file_path
(1)ibdata1从大改小
innodb_data_file_path = ibdata1:1G:autoextend -- 修改为:ibdata1:300M:autoextend
在版本是5.5和5.6中,启动正常,并且日志中没有任何异常。但是如果将autoextend去掉,就会报错,启动失败,如:[版本:5.5.37]
InnoDB: Error: data file ./ibdata1 is of a different size InnoDB: 65536 pages (rounded down to 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 tried 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 back 140911 23:51:53 InnoDB: to what it was, and remove the new ibdata files InnoDB created 140911 23:51:53 InnoDB: in this failed attempt. InnoDB only wrote those files full of 140911 23:51:53 InnoDB: zeros, but did not yet use them in any way. But be careful: do not 140911 23:51:53 InnoDB: remove old data files which contain your precious data! 140911 23:51:53 [ERROR] Plugin 'InnoDB' init function returned error. 140911 23:51:53 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 140911 23:51:53 [ERROR] Unknown/unsupported storage engine: InnoDB 140911 23:51:53 [ERROR] Aborting 原来的ibdata1大小为:65536*8*2/1024=1024M=1G 当前ibdata1被修改为:19200*8*2/1024=300M
比如:
innodb_data_file_path = ibdata1:1G:autoextend -- 修改为:ibdata1:1200M:autoextend
那么会在启动时出现如下错误:
*****在5.5版本中:[版本:5.5.37]
InnoDB: Error: auto-extending data file ./ibdata1 is of a different size InnoDB: 65536 pages (rounded down to MB) than specified in the .cnf file: InnoDB: initial 76800 pages, max 0 (relevant if non-zero) pages! 140911 23:57:43 InnoDB: Could not open 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 InnoDB: you should now edit innodb_data_file_path in my.cnf back 140911 23:57:43 InnoDB: to what it was, and remove the new ibdata files InnoDB created 140911 23:57:43 InnoDB: in this failed attempt. InnoDB only wrote those files full of 140911 23:57:43 InnoDB: zeros, but did not yet use them in any way. But be careful: do not 140911 23:57:43 InnoDB: remove old data files which contain your precious data! 140911 23:57:43 [ERROR] Plugin 'InnoDB' init function returned error. 140911 23:57:43 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 140911 23:57:43 [ERROR] Unknown/unsupported storage engine: InnoDB 140911 23:57:43 [ERROR] Aborting
2014-09-11 22:20:01 1222 [ERROR] InnoDB: auto-extending data file ./ibdata1 is of a different size 65536 pages (rounded down to MB) than specified in the .cnf file: initial 76800 pages, max 0 (relevant if non-zero) pages! 2014-09-11 22:20:01 1222 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the syste m tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata fil es InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be caref ul: do not remove old data files which contain your precious data! 2014-09-11 22:20:01 1222 [ERROR] Plugin 'InnoDB' 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: InnoDB 2014-09-11 22:20:01 1222 [ERROR] Aborting
当前ibdata1被修改为:76800*8*2/1024=1200M
blog地址:http://blog.csdn.net/hw_libo/article/details/39215723
-- Bosco QQ:375612082
---- END ----
-------------------------------------------------------------------------------------------------------
版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



New feature of PHP5.4 version: How to use callable type hint parameters to accept callable functions or methods Introduction: PHP5.4 version introduces a very convenient new feature - you can use callable type hint parameters to accept callable functions or methods . This new feature allows functions and methods to directly specify the corresponding callable parameters without additional checks and conversions. In this article, we will introduce the use of callable type hints and provide some code examples,

Product parameters refer to the meaning of product attributes. For example, clothing parameters include brand, material, model, size, style, fabric, applicable group, color, etc.; food parameters include brand, weight, material, health license number, applicable group, color, etc.; home appliance parameters include brand, size, color , place of origin, applicable voltage, signal, interface and power, etc.
![How to increase disk size in VirtualBox [Guide]](https://img.php.cn/upload/article/000/887/227/171064142025068.jpg?x-oss-process=image/resize,m_fill,h_207,w_330)
We often encounter situations where the predefined disk size has no room for more data? If you need more virtual machine hard disk space at a later stage, you must expand the virtual hard disk and partitions. In this post, we will see how to increase disk size in VirtualBox. Increasing the disk size in VirtualBox It is important to note that you may want to back up your virtual hard disk files before performing these operations, as there is always the possibility of something going wrong. It is always a good practice to have backups. However, the process usually works fine, just make sure to shut down your machine before continuing. There are two ways to increase disk size in VirtualBox. Expand VirtualBox disk size using GUI using CL

i9-12900H is a 14-core processor. The architecture and technology used are all new, and the threads are also very high. The overall work is excellent, and some parameters have been improved. It is particularly comprehensive and can bring users Excellent experience. i9-12900H parameter evaluation review: 1. i9-12900H is a 14-core processor, which adopts the q1 architecture and 24576kb process technology, and has been upgraded to 20 threads. 2. The maximum CPU frequency is 1.80! 5.00ghz, which mainly depends on the workload. 3. Compared with the price, it is very suitable. The price-performance ratio is very good, and it is very suitable for some partners who need normal use. i9-12900H parameter evaluation and performance running scores

C++ parameter type safety checking ensures that functions only accept values of expected types through compile-time checks, run-time checks, and static assertions, preventing unexpected behavior and program crashes: Compile-time type checking: The compiler checks type compatibility. Runtime type checking: Use dynamic_cast to check type compatibility, and throw an exception if there is no match. Static assertion: Assert type conditions at compile time.

During the development process, we may encounter such an error message: PHPWarning: in_array()expectsparameter. This error message will appear when using the in_array() function. It may be caused by incorrect parameter passing of the function. Let’s take a look at the solution to this error message. First, you need to clarify the role of the in_array() function: check whether a value exists in the array. The prototype of this function is: in_a

Hyperbolic functions are defined using hyperbolas instead of circles and are equivalent to ordinary trigonometric functions. It returns the ratio parameter in the hyperbolic sine function from the supplied angle in radians. But do the opposite, or in other words. If we want to calculate an angle from a hyperbolic sine, we need an inverse hyperbolic trigonometric operation like the hyperbolic inverse sine operation. This course will demonstrate how to use the hyperbolic inverse sine (asinh) function in C++ to calculate angles using the hyperbolic sine value in radians. The hyperbolic arcsine operation follows the following formula -$$\mathrm{sinh^{-1}x\:=\:In(x\:+\:\sqrt{x^2\:+\:1})}, Where\:In\:is\:natural logarithm\:(log_e\:k)

Although large-scale language models (LLM) have strong performance, the number of parameters can easily reach hundreds of billions, and the demand for computing equipment and memory is so large that ordinary companies cannot afford it. Quantization is a common compression operation that sacrifices some model performance in exchange for faster inference speed and less memory requirements by reducing the accuracy of model weights (such as 32 bit to 8 bit). But for LLMs with more than 100 billion parameters, existing compression methods cannot maintain the accuracy of the model, nor can they run efficiently on hardware. Recently, researchers from MIT and NVIDIA jointly proposed a general-purpose post-training quantization (GPQ).
