search
HomeOperation and MaintenanceWindows Operation and MaintenanceDetailed introduction to the method of modifying the mysql data directory under Win2008 r2

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/"

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!

Statement
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use