Digital Me

Random contributions to digital noise

MySQL custom data folder in Linux

Tuesday November 03, 2009 @ 01:36 AM (PST)
This info relates to Arch Linux and configuration of MySQL to use custom data folder. I followed instructions to install MySQL on ArchWiki. It worked like a charm, everything was working perfectly, until I tried to change data folder. Now, probably important thing to say is that I setup rc.conf to automatically start mysqld daemon. Google did not help this time :( since whatever I tried did not work. Even MySQL official documentation was of no help. Setting datadir in my.cnf did not help. But finally I found solution, and it was super easy:

Edit file: /etc/conf.d/mysqld
And enter your data folder there (/data/mysql in my case):
MYSQLD_ROOT="/data/mysql"

After that it worked. I don't know if this is Arch Linux specific, but I hope this will help someone not to loose as much time I did figuring out.

Comments

New comment

required, won't be displayed

optional

Don't type anything here unless you're an evil robot:


And especially don't type anything here:

Basic XHTML (including links) is allowed, just don't try anything fishy. Your comment will be auto-formatted unless you use your own <p> tags for formatting. You're also welcome to use Textile.

Copyright © 2010 Mihailo Lalevic. All rights reserved.
Powered by Thoth.