Specific steps to change the location of the MySQL database storage

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.