In Windows 7, Mysql5.7 is used to modify the loading path and Data Location of the my. ini file. mysql5.7my. ini

Source: Internet
Author: User

In Windows 7, Mysql5.7 is used to modify the loading path and Data Location of the my. ini file. mysql5.7my. ini

Update: currently, a MySQL installer is installed on the mysql official website to manage the configuration of mysql software and migrate data. In mysql installer, the database storage location changes when the mysql server is reconfigure. It is more stable than the old-fashioned manual migration below (the database cannot be started or cannot be shut down normally after manual migration ). For more information about how to customize the installation path for mysql installer in later versions, see http://www.bkjia.com/article/41093.htm.

Because we want to transmit the company's online database to a local machine for testing, we have been playing around for a long time to modify the data Location of the local mysql database. There are also a lot of online information, so I will not repeat it here, write your own problems for your reference.

Mysql version: 5.7
OS: Windows 7

(Different mysql versions may differ in the data path of the installation path and the path of the startup configuration file of my. ini)

Change the Data Location of mysql, except for the information on the Network:

(1) shut down the mysql service;

(2) modify my. datadir of ini (path "\" or "/", should the whole path name be enclosed in double quotation marks? How can this happen? I don't need double quotation marks and front slashes );

(3) migrate the entire data folder (the data folder may be in different folders according to the version and system, for example, in c: \ Program Files \ MySQL or c: \ ProgramData \ MySQL, we recommend you use the everything software.) Go to the modified directory. (4) restart.

In addition to the four basic steps, pay attention to which MySQL uses the Startup File my. ini. Take the information of mysql in the windows registry as the standard. For more information, see start-run-regedit-Press enter. Go to the windows registry and find[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MySql](Note that this is the registration path under win7 and mysql5.7, and other versions may be different.) modify the path file after "-- defaults-file =" in "ImagePath, this file is the configuration file read during mysql startup. It may not be stored in the mysql installation directory or in the data directory.

Summary

The above section describes Mysql5.7 in Windows 7, my. I hope it will be helpful for you to modify the INI file loading path and data location. If you have any questions, please leave a message and I will reply to you in a timely manner. Thank you very much for your support for the help House website!

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.