Add data files to MySQL

Source: Internet
Author: User
MySQL adds data files to the Ali jushita server, two hard disks, one system disk is only 49 GB, and one data disk is 188 GB. The default configuration is used when MySQL is installed. Therefore, the data files are stored on the system disk, today's task is to add a new data file and write the new data file into the data disk. Find the MySQL configuration file etcmy. cnfinnodb_data_home.

MySQL adds data files to the Ali jushita server, two hard disks, one system disk is only 49 GB, and one data disk is 188 GB. The default configuration is used when MySQL is installed. Therefore, the data files are stored on the system disk, today's task is to add a new data file and write the new data file into the data disk. Find the MySQL configuration file/etc/my. cnf innodb_data_home.

Add data files in MySQL

Alibaba jushita server, two hard disks, one system disk is only 49 GB, and one data disk is 188 GB. The default configuration is used when MySQL is installed. Therefore, the data file is stored on the system disk, today's task is to add a new data file and write the new data file into the data disk.

Find the MySQL configuration file/etc/my. cnf

Innodb_data_home_dir = innodb_data_file_path =/var/lib/mysql/ibdata1: 76 M;/data/mysql-data/ibdata2: 12 M: autoextend

? Only innodb_data_file_path is added at the beginning, but innodb_data_home_dir is not added. An error is reported when the mysql server is restarted. view the mysql error file.

1. Although the configuration of innodb_data_home_dir is the same as the default configuration, it cannot be omitted; otherwise, an error is returned.

2./var/lib/mysql/ibdata1: 76M. The output size must be the same as that of an existing file. Otherwise, an error is returned.

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.