Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a doubt :

Is mariadb support datadirectory location change from the default location to the another user defined location ?

When Iam trying to change datadir location of mariadb by editing the path in the configuration file my.ini, after this, restart the mariadb service, but it couldn't started. Only the default(installation) datadir location worked. The same succefully worked with mysql. Because this is the reason for my doubt...

Please anyone to help me from this issue... (Iam trying in windows)

share|improve this question
Please attach the output of your log files. – DanFromGermany Mar 26 '15 at 22:45

If you are using a distro like redhat/centos then selinux is not letting mariadb write outside of the pre-set data directory.

If you are using something like ubuntu then apparmour is doing the same thing that selinux is doing.

For a quick fix you can try disabling the one in question and then trying.

share|improve this answer

I am using InnoDB and had the same issue on windows (x64), I got the following error line (don't know what you got):

InnoDB: Error: log file .\ib_logfile0 is of different size 0 5242880 bytes
InnoDB: than specified in the .cnf file 0 52428800 bytes!

What helped was deleting the ib_logfile* files in the data folder from the new location. That created new logfiles w/o losing any data in the database.

share|improve this answer
ib_logfile*s are InnoDB's binary log, very sensitive topic if this file gets changed or corrupted. – DanFromGermany Mar 26 '15 at 22:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.