content_image/790733.jpg content_image/790732.jpg
You can also increase system tablespace size by adding another data file. To do so: 

1. Stop the MySQL server. 

2. If the last data file in the innodb_data_file_path  setting is defined with the autoextend  attribute, remove it, and modify the size attribute to reflect the current data file size. To determine the appropriate data file size to specify, check your file system for the file size, and round that value down to the closest MB value, where a MB is equal to 1024 x 1024 bytes. 

3. Append a new data file to the innodb_data_file_path  setting, optionally specifying the autoextend  attribute. The autoextend  attribute can be specified only for the last data file in the innodb_data_file_path  setting. 

4. Start the MySQL server. 

For example, this tablespace has one auto-extending data file: 

innodb_data_home_dir = innodb_data_file_path = /ibdata/ibdata1:10M:autoextend 

Suppose that the data file has grown to 988MB over time. This is the innodb_data_file_path  setting after modifying the size attribute to reflect the current data file size, and after specifying a new 50MB auto- extending data file: 

innodb_data_home_dir = innodb_data_file_path = /ibdata/ibdata1:988M;/disk2/ibdata2:50M:autoextend 

When adding a new data file, do not specify an existing file name. InnoDB  creates and initializes the new data file when you start the server. 

## Decreasing the Size of the InnoDB System Tablespace 

<img src='content_image/790733.jpg'>

<img src='content_image/790732.jpg'>

## Note 

You cannot increase the size of an existing system tablespace data file by changing its size attribute. For example, changing the innodb_data_file_path  setting from ibdata1:10M:autoextend  to ibdata1:12M:autoextend  produces the following error when starting the server: 

[ERROR] [MY-012263] [InnoDB] The Auto-extending innodb_system data file ’./ibdata1’ is of a different size 640 pages (rounded down to MB) than specified in 

The error indicates that the existing data file size (expressed in InnoDB  pages) is different from the data file size specified in the configuration file. If you encounter this error, restore the previous innodb_data_file_path  setting, and refer to the system tablespace resizing instructions. 

Decreasing the size of an existing system tablespace is not supported. The only option to achieve a smaller system tablespace is to restore your data from a backup to a new MySQL instance created with the desired system tablespace size configuration. 

For information about creating backups, see Section 15.18.1, “InnoDB Backup” . 

For information about configuring data files for a new system tablespace. See System Tablespace Data File Configuration. 

To avoid a large system tablespace, consider using file-per-table tablespaces or general tablespaces for your data. File-per-table tablespaces are the default tablespace type and are used implicitly when 

