ruhollah shafiee
ruhollah shafiee

Reputation: 13

mysql create table DATA DIRECTORY does not work

my query is : ALTER TABLE book DATA DIRECTORY = "/dev/book"; and executed it but i did not see any file in '/dev/book' path.

can any one help me? thanks !

Upvotes: 0

Views: 408

Answers (2)

     Юрий Светлов
Юрий Светлов

Reputation: 1750

You can:

  1. Stop mysql with innodb_fast_shutdown=0

  2. In /usr/local/mysql/my.cnf add innodb_directories="/home/mysql/new_location;"

  3. Move table files from current directory to new directory (as example: /home/mysql/new_location)

  4. Start up Mysql server.

Upvotes: 0

Ravi
Ravi

Reputation: 216

I dont think DATA DIRECTORY is works with Alter Query. You can set DATA DIRECTORY path only with create table query. More info here

Upvotes: 1

Related Questions