In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article is to share with you about the modification of the MySQL data directory under Windows. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.
The method of modifying the MySQL data directory under Windows: first stop the MySQL service and establish a new data file directory; then copy the data file and authorize the new data file directory; then modify the [my.ini] file; finally start MySQL.
How to modify the MySQL data directory under Windows:
Stop the MySQL service:
MySQL service in windows services, stop.
Create a new data file directory:
That is, the directory of MySQL data you want to store now, for example: e:\ MySQL5.6Data
Copy the data file:
Copy the original data directory under the "data files and subdirectories" to the E:\ MySQL5.6Data directory just established; pay attention to your original data file directory and data files, do not copy wrong, if you have not modified the original directory, the original directory should look like "..\ ProgramData\ MySQL\...\ data\", copy the contents of the data directory to the new directory.
New data file directory authorization
This step is very important, many students can not start MySQL because of this film, only 1067 error.
Right-click the new directory E:\ MySQL5.6Data, select the "Security" tab, and grant full control to all users and groups below (Note: the test machine can do this, if it is a production environment, you need a try until you do not report a 1067 error).
Modify the my.ini file
Many articles on the Internet say that my.ini is in the MySQL installation directory, and many people may find that there is no my.ini file in that location, only a my-default.ini file, which is basically useless.
Non-installed MySQL:my.ini configuration files may be in this directory
Installation version of most of the MySQL:my.ini files are in your data file directory, if not, you can right-click the windows service in the list of MySQL services, select Properties, in the "General" tab you can see the executable file path, followed by a-defaultFile parameter, the value behind this parameter is the path of your my.ini file.
After finding the my.ini file, open it and change the value of datadir to the new directory, such as E:\ MySQL5.6Data;. In most cases, just modify this place, but in order to ensure some "variation", you can check whether it needs to be changed by searching the original data path keywords (such as the original drive letter).
Save after modification. If you are an installed version of MySQL and the my.ini file is in the original data file directory, you need to do two more things:
1. Copy the modified my.ini file to the MySQL installation directory or the new data file directory
2, windows + r open "run", enter regedit enter to open the registry, find the MySQL service key under HKEY_LOCAL_MACHINE-- > SYSTEM-- > CurrentControlSet-- > services, and then modify its ImagePath attribute value to the new absolute path of the my.ini file.
Start MySQL
In the list of MySQL services, start MySQL.
Thank you for reading! On the Windows MySQL data directory modification method to share here, I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.