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