MySQL Forums
Forum List  »  InnoDB

InnoDB Data Across Mounted Partition
Posted by: purvesh pardeshi
Date: January 21, 2016 04:41AM

I am creating innodb table to store the data on mounted partition("/var/log/storage/MySQL") with following syntax:

create table InnoDB_Test(
a INT
) DATA DIRECTORY='/var/log/storage/MySQL'
INDEX DIRECTORY='/var/log/storage/MySQL'
engine=InnoDB;

Following are my partitons (output of df -h):
________________________________________________________
| Partition | Size | free | Used | Available | Mounted @
| /dev/sda2 | 6.5G | 3.6G | 2.6G | 59% | /
| /dev/sda1 | 0.3G | 0.3G | 0.3G | 9% | /boot
| /dev/sda6 | 5.3G | 0.2G | 5.0G | 1% | /var/log/storage
__________________________________________________________

But it is not storing the data in /var/log/storage/MySQL, rather it is storing it in /var/lib/mysql.

If I create MyISAM table using following syntax, then it is storing the data across mounted partition.

create table MyISAM_Test(
a INT
) DATA DIRECTORY='/var/log/storage/MySQL'
INDEX DIRECTORY='/var/log/storage/MySQL'
engine=MyISAM;

I have enabled innodb_file_per_table and have_symlink global variable.

System Configuration:
- CentOS 7.1
- MariaDB 5.5
- 2GB RAM
- 30GB Flash

Please tell me the way how I can store the InnoDB tables data on mounted partition ?
How this is working for MyISAM and not working for InnoDB ?

Options: ReplyQuote


Subject
Views
Written By
Posted
InnoDB Data Across Mounted Partition
1227
January 21, 2016 04:41AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.