0755mx 发表于 2018-10-9 06:02:59

MySQL Resize System Tablespace-12398798

  MySQL 版本: 5.7.18
  主要内容:

[*]  什么是system tablespace
[*]  system tablespace 的其它作用
[*]  扩展system tablespace

[*]  什么是system tablespace
  system tablespace是存放innodb data dictionary的空间。
[*]  system tablespace 的其它作用
  同时system还作为doublewrite buffer, the change buffer, and undo log的存储区域。
[*]  扩展system tablespace
  3.1 查看当前的system tablespace
  show variables like '%innodb_data_file_path%';
  note: 默认有一个12m的表空间文件
  3.2 扩展步骤
  3.2.1 关闭mysqld
  3.2.2 修改innodb_data_file_path选项
  innodb_data_file_path="ibdata1:12M;ibdata2:50M:autoextend"
  3.3.3 启动mysqld
  或者
  mysqld --datadir=/mysqldb/mysql-5.7.18/data --socket=/mysqldb/mysql-5.7.18/mysql.sock--port=3306 \
  --innodb_data_file_path="ibdata1:12M;ibdata2:50M:autoextend" &
  note1: 如果command line有";",必须用""引用。
  note2: 表空间文件的大小必须参照原来的大小。
  note3: 指定了datadir,表空间文件不需要指定路径,否则按当前路径的新路径对待。

页: [1]
查看完整版本: MySQL Resize System Tablespace-12398798