Chinaunix首页 | 论坛 | 博客
  • 博客访问: 415082
  • 博文数量: 137
  • 博客积分: 5190
  • 博客等级: 大校
  • 技术积分: 997
  • 用 户 组: 普通用户
  • 注册时间: 2010-02-21 16:19
文章存档

2011年(17)

2010年(120)

我的朋友

分类: Mysql/postgreSQL

2011-01-24 14:38:53

官方文档:

 innodb_log_files_in_group

Command-Line Format --innodb_log_files_in_group=#
Option-File Format innodb_log_files_in_group
Option Sets Variable Yes, innodb_log_files_in_group
Variable Name innodb_log_files_in_group
Variable Scope Global
Dynamic Variable No
  Permitted Values
Type numeric
Default 2
Range 2-100

The number of log files in the log group. InnoDB writes to the files in a circular fashion. The default (and recommended) value is 2.

 
当我直接修改my.cnf将该参数改为3的时候
重启mysql,报错,innodb引擎无法挂载
110124 14:06:23  InnoDB: Log file ./ib_logfile2 did not exist: new to be created
110124 14:06:23 [ERROR] Plugin 'InnoDB' init function returned error.
110124 14:06:23 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
 
 
 
 
Saver 说 (14:29):
*innodb_log_files_in_group 这个参数在初始化系统之后就不能调整了?
Popgo 说 (14:31):
*可以的
*你要先把原来的log备份下
Saver 说 (14:31):
*然后删了?
Popgo 说 (14:32):
*不是啊
Saver 说 (14:32):
*那咋搞
Popgo 说 (14:32):
*把原来的log文件备份,把innodb_log_files_in_group变成你需要的。让数据重新生成log文件
 
调整方式:
1.停止服务
 1036  service mysqld stop
2.移走当前的日志文件 
 1038  mkdir bak
 1039  cd bak
 1040  cd ..
 1041  mv ib_logfile* ./bak/
3.在my.cnf中修改参数数值
4.启动服务
 1043  service mysqld start
 
系统处理日志
110124 14:44:55 mysqld_safe Starting mysqld daemon with databases from /data/mysql
110124 14:44:55  InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 512 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Progress in MB: 100 200 300 400 500
110124 14:45:00  InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 512 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Progress in MB: 100 200 300 400 500
110124 14:45:05  InnoDB: Log file ./ib_logfile2 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile2 size to 512 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Progress in MB: 100 200 300 400 500
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
110124 14:45:10  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Last MySQL binlog file position 0 793029012, file name ./mysql-bin.000048
110124 14:45:12  InnoDB: Started; log sequence number 136 3284391948
 
 
 
 
阅读(8470) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2011-03-09 13:16:17

很好的, 收藏了 推荐一个博客,提供很多免费软件编程电子书下载: http://free-ebooks.appspot.com