Innodb system tablespace maintenance method and innodb tablespace Maintenance
Environment Description:
There is a running mysql environment, because the previous configuration file settings are too simple (no innodb_data_file_path configuration change is configured); as a result, the system tablespace is full now
If innodb_data_file_path is not set before, it will use the default value: innodb_data_file_path = ibdata1: 12 M; the problem is that it is not set here.
Autoextend
Solution:
1. Disable mysql that is already running
Mysqladmin-h127.0.0.1-uroot-pxxxx shutdown
2. Add a second system tablespace file for mysql, set its size, and add the autoextend attribute.
[Mysqld] innodb_data_file_path = ibdata1: 12 M; ibdata2: 12 M: autoextend
3. Restart mysql
Service mysqld start
By the way, if you want to narrow down the system tablespace, you can also do it in general;
The procedure is as follows:
1. Use mysqldump to back up your database
2. Close your mysql database and delete files under datadir.
3. Edit the configuration file to the desired configuration and re-initialize a new mysql database.
4. Restore the database from the dump file in step 1
The above innodb system tablespace maintenance method is a small part of the Content shared to everyone, I hope to give you a reference, but also hope you can support a lot of help home.