Monday, July 10, 2017

Change Datadir of MariaDb in window environment

Change Datadir of MariaDb in window environment


stop MySQL service 

edit my.cnf in C:Program FilesMariaDB 10.1data

change or add value of datadir=""""

copy content of folder "data" with following commands

Copy a Folder to Another Folder and Retain its Permissions

  1. Click Start, and then click Run.
  2. In the Open box, type cmd, and then click OK.
  3. Type xcopy sourcedestination /O /X /E /H /K and then press ENTER, where source is the source path for the files to be copied, and destination is the destination path for the files.

Example

Type xcopy c:olddocs c:newdocs /O /X /E /H /K, and then press ENTER, where olddocs is the source folder and newdocs is the destination folder.


start MySQL service