Mysql – Extend thesql 5.5 tablespace to another drive on windows


I have greater than 300gb mysql database which is running out of disk space in D: drive on windows.( Presently the ibd data file is in D: drive which is running out of space). I have a F: drive which is having around 200 GB free space.

1)How can i extend the ibd data file to f: drive so that all new inserts go in f drive ?
Variable innodb_file_per_table is OFF currently.
Innodb_data_filepath : ibdtaxx:10M:autoextend

Please leave your suggestions on what will be the best course of action to follow in this situation.

Best Answer

mysql have "working dir" where all the schemas' dirs are stored. You have to:

  • stop your mysql
  • move the dir with desired schema to the new huge drive

mv D:\path\to\workingdir\dbschema F:\dbschema

  • make the link from the new location to the old working dir:

mklink \D F:\dbschema D:\path\to\workingdir\dbschema

  • start your mysql

Test that approach on some noncritical schema, indeed.