Detailed introduction to the method of modifying the mysql data directory under Win2008 r2

黄舟
Release: 2017-06-04 11:02:10
Original
1575 people have browsed it

In 2008InstallationmysqlI found that the database directories are all placed on the c drive, which is not safe for the data. The c drive is only placed System, quickly change the mysql directory, otherwise data loss will be in trouble

Change the defaultmysql databaseDirectory

Change C:\ProgramData\MySQL\MySQL Server 5.1\data Change to D:\MysqlData

1. Create the folder D:\MysqlData

2. Stop the mysql service and change "C:\ProgramData\MySQL Server 5.1\data" Copy all files to D:\MysqlData

3. Find the my.ini file in the mysql installation directory and find:

#Path to the database root
#data
dir
="C:/ProgramData/MySQL/MySQL Server 5.1/Data/"
Copy after login

Change the value of datadir to: datadir="D:/MysqlData /"

After saving, restart the mySQL service.

Note: The C:\ProgramData directory is a hidden folder, you can uncheck "Don't show hidden files..." in the file options

The above is the detailed content of Detailed introduction to the method of modifying the mysql data directory under Win2008 r2. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template