Comments - Does MariaDB support multiple data directories within a single instance?

10 years, 9 months ago roberto spadim

from mysql 5.0 manual, http://dev.mysql.com/doc/refman/5.0/en/create-table.html you should use DATA DIRECTORY AND INDEX DIRECTORY, mariadb is based (last version 10.0.3) in mysql 5.5, maybe 10.0.4 will merge mysql 5.6, but * DIRECTORY is older than 5.5, i think it support without problem, must test

 
10 years, 9 months ago Joshua Valencia

Sorry for not making this clear. I want to know if this works with InnoDB / XtraDB, which seems like a MySQL 5.6 addition:

http://dev.mysql.com/doc/refman/5.6/en/innodb-multiple-tablespaces.html http://dev.mysql.com/doc/refman/5.6/en/tablespace-placing.html

From the link above, the DATA DIRECTORY option works with MYISAM in 5.0

 
10 years, 8 months ago Frank Flynn

You must use inno_db_file_pre_table which keeps the data for each table in a specific file for that table.

Turn on inno_db_file_pre_table, Rebuild your table (ALTER TABLE foo ENGINE=INNODB) Shut down your DB Move the file for that particular table to your special disk / storage device and symlink it from the original location (the DATA DIRECTORY) to the new location. (Make sure the files and symlinks are owned by mysql) Start your DB.

This will work as you expect.

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.