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.