Change MySQL data directory stored in address

Source: Internet
Author: User

To view the MySQL file directory My.ini file, you can find similar
Datadir= "D:/beeagle/program files/mysql/mysql Server 5.0/data/" The path is the MySQL Data directory
Default in: "C:\Documents and Settings\All Users\Application Data\mysql\mysql Server 5.1\data\"

Note: The Application Data folder is hidden!!!
You can modify the configuration above to place the data folder where you want it to be.


---Modify the following methods:

1. Stop MySQL, in the command window to enter and run: net stop MySQL can;

2. Cut the Data folder in the "C:\Documents and Settings\All Users\Application Data\mysql\mysql Server 5.1\data\" to the destination. I put it in the "D:\PHP\MySQL\MySQL Server 5.1" directory (with MySQL), and the directory "C:\Documents and Settings\All Users\Application Data\mysql\mysql Server 5.1\ "deleted.

3. Modify the My.ini file and change the DataDir to datadir= "D:\PHP\MySQL\MySQL Server 5.1\data\"

4. Start MySQL, enter and run in the command window: net start MySQL can;

5. After the modification, you can copy the corresponding database attached objects to the inside.

Related Article

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.