You are here


MySQL - Move Data Files To New Location (Windows)

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;
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
12 + 4 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer