First, the MySQL service first stop, change the MySQL configuration file My.ini in the database storage master path, the old database storage master path of the database files and folders copied to the new storage master path, and then restart the fix.
First stop the MySQL service.
Two. Change the database storage master path in MySQL configuration file My.ini
Open the MySQL default installation folder C:\Program My.ini file in Files\mysql\mysql Server 5.1, click "Edit", "find" at the top of Notepad, enter DataDir in the Find content and click "Find Next" to "go to" Path to the database root databases store the main path "parameter settings, find Datadir=" C:/Documents and Settings/all users/application data/mysql/mysql Server 5.1/data/"is the default database store master path setting, now change it to the C:\mysql\data (you want) folder, the correct setting is Datadir=" c:/mysql/data/".
Click "File" on the menu bar and click "Save" when you are done.
Three. Copy the database files and folders from the old database storage master path to the new storage master path
Copy all the files and folders in the C:/Documents and Settings/all users/application data/mysql/mysql Server 5.1/data/folder to your new folder directory.
Four. Restart the MySQL service
Five. Verify that the operation to change the database storage master path is successful
To change the location of the MySQL database data store