The configuration file of the newly added tablespace mainly uses this parameter.
Test Environment
Innodb_data_file_path = ibdata1: 370 M; ibdata2: 50 M; ibdata3: 50 M; ibdata4: 500 M; ibdata5: 500 M: autoextend
There are several situations
1. During online environment, my tablespace was not planned before. After using it for a period of time, I want to add a new tablespace. In this case, I need to first obtain the ibdata1 size, my method is to configure a random size in the configuration, such as 371 mb. when mysql is started, an error will not be reported. Check the error log, which contains the size of pages, calculate the ibdata1 size by the size of this pages.
Ibdata = pages * page_size/1024
Page_size = 16 k (mysql Default, which can be changed during compilation. Next, we will test the impact of this value on performance)
(The normal method for obtaining the tablespace size is not found; the value of du-h is too large, minus 1, 2 M. You can try it)
2. Plan the table space usage and size before using mysql, as shown in figure
Innodb_data_file_path = ibdata1: 10G; ibdata2: 10G; ibdata3: 10G; ibdata4: 10G; ibdata5: 10G: autoextend
This method is ideal.
Table space usage
If you use the 2nd method to create a tablespace, the five tablespaces will be created after initialization, but the disk space will be occupied first. If you use these five tablespaces, they will still be used in order, the first is full and the second is used.