`
Shelly.Kuang
  • 浏览: 158211 次
  • 性别: Icon_minigender_2
  • 来自: 广州
社区版块
存档分类
最新评论

如何安全的修改innodb_log_file_size值

 
阅读更多

If you need to change MySQL’s innodb_log_file_size parameter (see How to calculate a good InnoDB log file size), you can’t just change the parameter in the my.cnf file and restart the server. If you do, InnoDB will refuse to start because the existing log files don’t match the configured size.

You need to shut the server down cleanly and normally, and move away (don’t delete) the log files, which are named ib_logfile0, ib_logfile1, and so on. Check the error log to ensure there was no problem shutting down. Then restart the server and watch the error log output carefully. You should see InnoDB print messages saying that the log files don’t exist. It will create new ones and then start. At this point you can verify that InnoDB is working, and then you can delete the old log files.

The typical error message you’ll see in the client when InnoDB has refused to start due to log file size mismatch looks like this:

ERROR 1033 (HY000): Incorrect information in file...

That really means that InnoDB hasn’t started, and MySQL is trying to access a table with the InnoDB storage engine, which is failing, of course.

分享到:
评论

相关推荐

    数据库优化配置.doc

    [client] port=3306 [mysql] no-beep default-character-set=utf8 [mysqld] datadir=D:/Data port=3306 server-id=...log_file_size=1G innodb_log_buffer_size=8M innodb_flush_log_at_trx_commit=2 innodb_file_per_t

    mysql主从复制

    5> innodb_data_file_path = ibdata1:10M:autoextend表空间的名字以8M增长,可以将其大小修改:例如50M 6> innodb_log_group_home_dir = /usr/local/mysql/var/ 7> innodb_buffer_pool_size = 128M共享表空间,表...

    MySQL的Innodb引擎配置说明.txt

    内容包括: 1.MySQL的Innodb引擎配置 1.如何配置MySQL服务器的最大连接数量 2.如何配置innodb_open_files,table_open_cache,innodb_file_io_threads和innodb_buffer_pool_size,innodb_log_file_size

    mysql 有关“InnoDB Error ib_logfile0 of different size”错误

    mysql 有关“InnoDB Error ib_logfile0 of different size”错误的解决方法,需要的朋友可以参考下。

    my.cnf参数配置实现InnoDB引擎性能优化

    2. innodb_log_file_size 3. innodb_log_buffer_size 4. innodb_flush_log_at_trx_commit 然后自己写了两个例子,一个单线程的,一个多线程的来通过改变配置参数来测试是否提高了性能。结果是只有innodb_flush_...

    Mysql启动中 InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes 的问题

    Mysql可以正常启动,但innodb的表无法使用 在错误日志里你会看到如下输出: InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes 现在需要做的事情就是把原来的 innodb 的ib_logfile×...

    mysql参数及其优化

    query_cache_size、query_cache_type、innodb_buffer_pool_size、innodb_log_file_size、innodb_log_buffer_size、innodb_flush_logs_at_trx_commit、transaction_isolation、innodb_file_per_table、innodb_open_...

    java.sql.SQLSyntaxErrorException:

    从报错信息看是因为innodb_log_file_size太小,至于原因,在 mysql 5.6中,对innodb_log_file_size做了限制,如果存在blob字段,则innodb_log_file_size必须至少是最大单行数据的10倍大小。查了

    Mysql5.5 InnoDB存储引擎配置和优化

    环境为CentOS系统,1G内存,Mysql5.5.30。在/etc/my.cnf内添加: 代码如下:skip-external-lockingskip-name-resolvemax_connections...pool_size = 4Minnodb_log_file_size = 128Minnodb_log_files_in_group = 2innodb_

    innodb引擎redo文件维护方法

    2、修改配置文件中的innodb_log_file_size 、innodb_log_files_in_group 3、启动mysql service mysqld start 按官方文档上的说明是mysql会在完成恢复操作后下一个checkpoint,所以把老的日志文件都删除,从新根据新...

    mysql数据库my.cnf配置文件

    不论事务是否已经提交)默认的日志文件是ib_logfile0,ib_logfile1 # 1:当设为默认值1的时候,每次提交事务的时候,都会将log buffer刷写到日志。 # 2:如果设为2,每次提交事务都会写日志,但并不会执行刷的操作。每...

    InnoDBinsert性能拐点测试

    上篇blog《InnoDBselect性能拐点测试》测试了InnoDBselect的性能拐点,...  1、调整my.cnf的参数如下:  innodb_file_per_table=0  innodb_flush_log_at_trx_commit=2  innodb_buffer_pool_size=8G  innodb_file_i

    mysql 断电不能启动

    2017-11-15 19:23:46 16c0 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with ...

    【分布式事务----LCN】LCN原理及使用方式.docx

    spring.datasource.maxPoolPreparedStatementPerConnection Size=20 #配置监控统计拦截的filters, 去掉后监控界面sql无法统计, 'wall'用于防火墙 spring.datasource.filters=stat,wall,log4j #通过...

Global site tag (gtag.js) - Google Analytics