mysql 表存储位置更改


mysql> USE test;

Database changed

mysql> SHOW VARIABLES LIKE 'innodb_file_per_table';

+-----------------------+-------+

|Variable_name | Value |

+-----------------------+-------+

|innodb_file_per_table | ON |

+-----------------------+-------+

mysql> CREATE TABLE t1 (c1 INT PRIMARY KEY) DATA DIRECTORY = '/alternative/directory';

# MySQL creates a .ibd file for the new table in a subdirectory that corresponding# to the database name

db_user@ubuntu:~/alternative/directory/test$ ls t1.ibd

# MySQL creates a .isl file containing the path name for the table in a directory# beneath the MySQL data directory

db_user@ubuntu:~/mysql/data/test$ ls db.opt t1.frm t1.isl


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM