Long story short. I have a MySQL database that has only one table and is around 50GB, while my drive storage is almost full and cannot get reduced.
So the only way is to reduce the size of the 50GB MySQL data table (the app I use is MySQL Workbench).
I tried the Delete function but it does not work becase it requires additional storage (which I don't have) to perform the Optimize function so that the underlying IBD file can be truly reduced.
I tried copying the IBD file to a different drive in the same computer and reopening it there using MySQL but it does not work as it seems opening an IBD file is not straight forward and very complicated based on my online research. In addition, then I tried changing MySQL's folder to a different drive path with the IBD file saved there by editing the my.ini file but the app cannot work after the change of folder path.
So, is there any workaround such as creating a new database in some format through querying partial data from the existing table that MySQL can open (showing in the schema) before deleting the existing IBD file completely?
And what is the possible reason that MySQL app cannot run after I changed the folder path in my.ini
file? since the current drive has a very small storage, I will mostly likely change it to a different drive which is bigger to cater for future database growth.
datadir
on Windows is difficult. I've never understood why. If I had to use Windows, I'd consider leavingdatadir
unchanged, but mount the larger disk drive at that location. See superuser.com/questions/1181060/…