InnoDB configuration of a standalone table space
Environment Introduction:
MySQL version: 5.5.40
1. See if the stand-alone table space is turned on
Mysql> Show variables like '%per_table% ';
+-----------------------+-------+
| variable_name | Value |
+-----------------------+-------+
| innodb_file_per_table | OFF |
+-----------------------+-------+
1 row in Set (0.00 sec)
Description: Off means that MySQL is a shared table space
2. Stop the MySQL server:
[[email protected] ~]#/etc/init.d/mysqld stop
3. Modify the My.cnf file:
[Mysqld]
Innodb-file-per-table=1
4. Start MySQL
[[email protected] ~]#/etc/init.d/mysqld start
5. Verify that the feature is turned on
mysql> Show variables like '%per_table% ';
+-----------------------+-------+
| variable_name | Value |
+-----------------------+-------+
| innodb_file_per_table | On |
+-----------------------+-------+
1 row in Set (0.00 sec)
Summary:
1. If the online server needs to save data, add 2 more steps
A. Backing up data with mysqldump
b. Using MySQL to recover the corresponding data
Reference Link: http://blog.csdn.net/jacson_bai/article/details/44781033
2. Delete the old files, you need to delete ibdata*, also delete the corresponding log file ib_logfile*, or start MySQL, will prompt the exception missing mysql.pid file;
InnoDB configuration of a standalone table space