snippetsqlMajor
How can I move a MySQL database to another drive?
Viewed 0 times
canmovedatabasemysqlanotherhowdrive
Problem
I'm using MySQL 5.5 on a local machine to analyze a large amount of government data. I've created a local database that resides on my default drive (Win7 C: drive). I'd like to store the data on my E: drive, a large eSATA external drive.
What steps should I take?
What steps should I take?
Solution
- Shutdown mysql.
- Move all the files in your current data directory to the new location (check out the location in step 3 -
datadirparameter).
- Locate
my.inifile (it is in the mysql installation directory). Changedatadirparameter value to point to the new location.
- Start mysql.
Context
StackExchange Database Administrators Q#14320, answer score: 48
Revisions (0)
No revisions yet.