MySQL Tips | For easy backup and security, how does the MySQL database storage directory change?

Source: Internet
Author: User

This article tags: mysql tips mysql database Internet gossip

After we installed playing MySQL, the database storage directory is in MySQL by default, in order to facilitate backup and security, we are necessary to change the MySQL database storage directory. So, how do you change it?

Open a CMD command Prompt window and enter a command to stop the MySQL service from running

net stop MySQL

Open X:\Server_Core\MySQL\my.ini,

Found it:

DataDir = "X:\Server_Core\MySQL\data"

Modified to:

DataDir = "X:\Database"

Copy the X:\Server_Core\MySQL\data folder to X:\ and rename the X:\Database;

Open the cmd Command Prompt window and enter the command to start the MySQL service.

net start MySQL

Finally, re-test whether MySQL is working properly.

    1. written at the end: for Freedom look outside the world, as well as it this line, not to go to Google data, finally, Amway a V--PN agent. a red apricot VPN, to Google to check the information is the absolute first choice, the connection speed, the use is also convenient. I bought is 99¥ a year, through this link (http://my.yizhihongxing.com/aff.php?aff=2509) registered after the Member center to lose the coupon code, split down, only 7 yuan per month, special benefits.

      This article tags: mysql tips mysql database internet gossip

      Turn from SUN's BLOG-focus on Internet knowledge, share the spirit of the Internet!

      Original address: mysql Tips | How do i change the MySQL database storage directory for backup and security purposes? "

      Related reading: Aaron swartz– The internet genius of the life course: every moment asked himself, now the world what is the most important thing I can participate in doing? "
      Related reading: " site environment Apache + PHP + mysql xampp, how to implement a server on the configuration of multiple sites?" "

      Related reading: What is the engineer culture? Why are the engineers alive? Why do I need an engineer culture as an IT or internet company? "

      Related reading: useful for programmers: 2017 latest in Google's Hosts file download and summary of the various hosts encountered the problem of the solution and configuration of the detailed

      related reading: the Win10 perpetual activation tutorial and how can I see if the Windows system is permanently activated? 》

      Related blog:SUN ' S blog -Focus on Internet knowledge and share the spirit of Internet! Go and see:www.whosmall.com

MySQL Tips | For easy backup and security, how does the MySQL database storage directory change?

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.