Monthly archive

MySQL - Move Data Files To New Location (Windows)

ben himself's picture

After setting up MySQL, I realized that I put my data files on the C drive.  Since I don't want database growth to end up taking down the entire OS, I had to move them.  My struggles consumed a couple of hours, so I wanted to clear up and document the process.

Default Database Files

MySQL (5.7) stores the default configuration files at:
C:\ProgramData\MySQL\MySQL Server 5.7\

To verify where your files are stored, simply run this MySQL script:
 

select @@datadir;

Tags: