MySQL modify data storage directory
Simple Method
View the current directory
Connection to MySQL
enter a query directory commandSHOW VARIABLES LIKE '%datadir%';
Similar results
Variable_name Value ------------- ---------------- datadir D:\MySQL\Data\
Modify directory
Stop MySQL service
To: Data contents of the directory "D \ MySQL \ Data" is copied to the new location you want to store
MySQL installation directory, locate the my.ini. Modify datadir = "Custom directory" to save.
Confirm directory modification
Start MySQL service
enters a query directory command, confirmed directory for the new directory.SHOW VARIABLES LIKE '%datadir%';