Conversion between shared tablespace and exclusive tablespace bitsCN.com
Conversion between shared and exclusive tablespaces
Innodb_file_per_table is converted using this parameter. if it is OFF, it indicates that the exclusive tablespace is used. [by default, the tablespace used is a shared tablespace]
The innodb_file_per_table value can be modified, but it does not affect the previously used shared tablespace unless it is manually modified or innodb_file_per_table = 1 is used for the shared tablespace innodb_file_per_table = 0.
Modify the data storage location of an exclusive empty tablespace
innodb_data_home_dir = "C:/mysql/data/"innodb_log_group_home_dir = "C:/mysql/data/"innodb_data_file_path=ibdata1:10M:autoextendinnodb_file_per_table=1
Parameter description:
This configuration configures a single file with an expandable size of 10 Mb, named ibdata1. No file location is provided, so it is in the MySQL data directory by default. [Data initialization settings]
Innodb_data_home_dir indicates that innodb_log_group_home_dir is the directory where the database files are stored. innodb_file_per_table indicates whether to use the shared and exclusive tablespace.
The preceding parameters must be added together.
Notes for parameters
InnoDB does not create a directory. Therefore, before starting the server, make sure that the "configured path directory" exists. This is true for any log file directory you configured. Use the mkdir command of Unix or DOS to create any required directories.
By deploying the value of innodb_data_home_dir to the data file name in the original format, and adding a slash or backslash as needed, InnoDB forms a directory path for each data file.
If the innodb_data_home_dir option is not mentioned in my. cnf, the default value is the "dot" directory./, which means the MySQL data directory.
BitsCN.com