MySQL-5.7設置InnoDB表數據文件存儲位置
阿新 • • 發佈:2017-11-21
pid file buffer 就是 like 位置 orm for inno
[root@localhost data]# ls
a1 a2 a3 auto.cnf ib_buffer_pool ibdata1 ib_logfile0 ib_logfile1 ibtmp1 localhost.localdomain.err localhost.localdomain.pid mysql performance_schema sys
ibdata1就是InnoDB表的共享存儲空間,默認innodb所有表的數據都在一個ibdata1裏。
查看當前配置
mysql> show variables like ‘%per_table%‘; +-----------------------+-------+ | Variable_name | Value | +-----------------------+-------+ | innodb_file_per_table | ON | +-----------------------+-------+ 1 row in set (0.02 sec)
目前是打開狀態,表示數據將按表單獨存儲。
若未開啟,設置配置文件,加入如下行:
innodb_file_per_table=1
MySQL-5.7設置InnoDB表數據文件存儲位置