mysql> create table test_table( testId int PRIMARY KEY, testName VARCHAR(20) ) DATA DIRECTORY = '/home/Test/Sample/data';
Write how:
mysql> create table test_table( testId int PRIMARY KEY, testName VARCHAR(20) ) DATA DIRECTORY = '/tmp/data';
To simplify your life, try saving to the '/ tmp' directory, since mysql has access to this directory, and not swaying with (chown) ownership change.
source share