-3

When creating a new table, I specified the data directory with:

CREATE TABLE t2 (c1 INT PRIMARY KEY) 
TABLESPACE = innodb_file_per_table 
DATA DIRECTORY = '/alternative/directory';

How can I find the data directory of this table later? If I do select @@DataDirectory I see the global data directory, not the custom data directory for this table in particular.

Luca Gibelli
  • 2,731
  • 1
  • 22
  • 30
asvignesh
  • 117
  • 1
  • 7

1 Answers1

1

Look for a t2.isl file in the database directory beneath the MySQL DATADIR directory. The .isl file is treated by MySQL like a symbolic link.

See https://dev.mysql.com/doc/refman/5.6/en/tablespace-placing.html for more details.

Luca Gibelli
  • 2,731
  • 1
  • 22
  • 30