MySQL5 How to set data files to be stored by table when using the InnoDB engine

Source: Internet
Author: User

In the InnoDB engine, the tables of the database can share storage space and can be stored separately by table, although the shared storage space looks neat and clean, but it is not advisable from the perspective of management and operations. First in the same MySQL server can not access the database table will be stored in a file, this file will not be the database of a table or the deletion of some data to shrink two, when the database is many and insert operations frequently, the shared storage file will grow very quickly. If the database is to be migrated, the schema is relatively simple, but the data stored in the space is less easily detached.

If the use of separate storage by the table can be a good solution to the above problem, unfortunately, when using the InnoDB engine in MySQL5, the default is to use shared storage space. So after we install MySQL we can stop the MySQL service in My.ini (Windows system) or my.conf (Linux system) to add the following configuration:

Innodb_file_per_table=1

MySQL5 How to set data files to be stored by table when using the InnoDB engine

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.