Environment
Os:windows Server R2 x64
MARIADB:10.0.15-MARIADB; installation directory is C:\Program FILES\MARIADB 10.0
Steps
1, stop the MySQL service.
2, copy the Data directory.
Create the D:\MariaDB_DATA directory and add NETWORK SERVICE permissions to the directory, and copy the contents of the C:\Program files\mariadb 10.0\data directory to D:\MariaDB_DATA.
3 . Move the configuration file.
The My.ini file is created by
C:\Program files\mariadb 10.0\data\my.ini
Move to
C:\Program files\mariadb 10.0\my.ini
4, Modify the configuration file.
Add or modify the following two items in the C:\Program files\mariadb 10.0\my.ini file.
[Mysqld]basedir=c:\program files\mariadb 10.0 #程序安装目录datadir =d:\mariadb_data #数据目录
5. Modify the Registration form:
Hkey_local_machine\system\currentcontrolset\services\mysql\imagepath
Will
"C:\Program files\mariadb 10.0\bin\mysqld.exe" "--defaults-file=c:\program files\mariadb 10.0\data\my.ini" "MySQL"
Revision changed to
"C:\Program files\mariadb 10.0\bin\mysqld.exe" "--defaults-file=c:\program files\mariadb 10.0\my.ini" "MySQL"
6 . Start the MySQL service.
Walker used the above method to avoid 1067 and errcode:13 "Permission denied" and other errors. Additionally, if a service startup failure can be done by error log files, the file is the current hostname under Data directory hostname.err,hostname.
Walker * * *
This article is from "Walker's Journal" blog, please be sure to keep this source http://walkerqt.blog.51cto.com/1310630/1703192
Mobile MARIADB Data Directory under Windows