Innodb; multiple data directories

后端 未结 3 589
长发绾君心
长发绾君心 2021-01-07 06:05

I have a requirement to store two Innodb database files on separate partitions. (one database on raid0 for speed, the other on raid1 for stability)

From what I\'ve r

3条回答
  •  旧时难觅i
    2021-01-07 06:26

    Scenario 2 MOVE 1 TABLE TO NEW DATA DIRECTORY

    Platform - Windows Server,MySQL 5.6

    Database - Test

    Table - Employee

    Source Data directory - D:\Program Files\MySQL\MySQL Server 5.6\data\test\

    Destination Data directory -E:\data\New_data\test\

    STEPS

    Ensure the global variable innodb_file_per_table = 1

    Stop MySQL server

    Move the innodb file employee.ibd file to separate disk/folder by simple file move to E:\data\New_data\test\

    Note - Keep the employee.frm in the original data directory D:\Program Files\MySQL\MySQL Server 5.6\data\test\

    in the source data directory - D:\Program Files\MySQL\MySQL Server 5.6\data\test\ - Create a text file with .isl extension e.g. employee.isl Edit the .isl file and type in the new path to the employee.ibd file that you moved.

    In the File -D:\Program Files\MySQL\MySQL Server 5.6\data\test\employee.isl E:\data\New_data\test\employee.ibd

    grant write permission to teh folder E:\data

    Start MySQL server

    use test;

    select * from employee

提交回复
热议问题