• 14.7.2 Changing the Number or Size of InnoDB Redo Log Files 改变InnoDB Redo Log Files的数量和大小


    14.7.2 Changing the Number or Size of InnoDB Redo Log Files 改变InnoDB Redo Log Files的数量和大小
    
    改变 InnoDB redo log 文件的数量和大小在MySQL 5.6.7或者更早版本,执行下面步骤:
    
    1.如果 innodb_fast_shutdown is set to 2, set innodb_fast_shutdown to 1: 
    mysql> show variables like '%innodb_fast_shutdown%';
    +----------------------+-------+
    | Variable_name        | Value |
    +----------------------+-------+
    | innodb_fast_shutdown | 1     |
    +----------------------+-------+
    1 row in set (0.00 sec)
    
    mysql> SET GLOBAL innodb_fast_shutdown = 1;
    
    
    2.在确保 innodb_fast_shutdown  不是设置为2后,停止MySQL 确保关闭没有错误
    
    3.拷贝老的log 文件到一个安全的地方万一错误发生 在你关闭期间你需要它们来恢复表空间
    
    4. 删除老的日志文件从log file 目录
    
    5.编辑my.cnf来改变log file 配置
    
    6.再次启动mysql,mysqld 看到没有InnoDB log文件存在在启动时 会创建新的
    
    
    在MySQL 5.6.8种, innodb_fast_shutdown 设置是不先关了当改变InnoDB log files的数量或者大小时。
    
    此外, 你也不需要移除老的日志文件,尽管你仍旧需要copy 来的日志文件到一个安全的地方,作为备份。
    
    改变InnoDB log files的大小和数量,执行下面的步骤:
    
    1.停止MySQL server 确保他关闭没有错误
    
    2.编辑my.cnf 改变log file配置。改变log file大小,配置 innodb_log_file_size.
    
    增加log files的数量,配置innodb_log_files_in_group. 
    
    3.再次启动MySQL
    

  • 相关阅读:
    exit()和_exit()的比较(与前一篇日志行缓冲区有关)
    标准IO缓冲详解全缓冲、行缓冲、不缓冲
    windows与unix/linux下输入回车换行的区别
    strtok()的用法
    头文件的处理
    feof()出现的问题及解决办法
    测试题
    视觉十四讲:第十二讲_八叉树地图
    树莓派4B安装OPENCV4.0
    编译OpenCV以及openc_contrib提示缺少boostdesc_bgm.i文件出错的解决
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13350062.html
Copyright © 2020-2023  润新知