Home  >  Article  >  Database  >  Mysql安装完成后的data目录修改_MySQL

Mysql安装完成后的data目录修改_MySQL

WBOY
WBOYOriginal
2016-06-01 13:51:13872browse

之前在安装Mysql的时候没注意,发现data的默认安装目录是在C盘,现在C盘的data文件夹居然膨胀到500多M了。于是自己动手把data文件夹挪移一下位置,这里自己做一下记录。

第一步,运行Mysql命令,停止sql运行;

第二步,复制C盘data文件夹到想转移到的目录,这里设定为D:/Mysql5.1/data

第三步,修改Mysql安装目录下的my.ini文件,找到其中关于“datadir=”的代码,将前面转移好的目录地址写上,修改后保存;

第四部,重新启动Mysql查看是否转移成功;

需要提醒的是:在做data目录更改之前,记得备份好data数据,避免不必要的损失。

转自:http://www.3ppt.com/Design/MySQL/37750.html

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