Innodb system tablespace maintenance method and innodb tablespace Maintenance

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.