For a new mysql instance, you could set up mysql in a different directory
by changing the location in my.cnf before you start it up. The moving of an
existing mysql db doesn't look too difficult either (
https://orahow.com/how-to-change-mysql-data-directory-to-a-new-location-on-linux/).
And I don't see why you couldn't use a symlink if you really wanted. You
could also remount a drive partition as /var/lib/mysql, which will do the
same thing.

If you are planning on moving your existing data, I would suggest shutting
your DB down, making a good copy somewhere first, then try your chosen
method out. Be sure to let us know what you choose and how it turns out.

Jeremiah Bess


On Sat, Nov 24, 2018 at 4:09 AM fugee ohu <[email protected]> wrote:

> I like to keep all my data on a separate drive so i know i can go crazy on
> my operating system drive without worrying about data but I often forget
> that mysql data still on my os drive The procedure for changing the mysql
> data directory is pretty involved Why don't I just symlink /var/lib/mysql
> to whatever directory I wanna use and that should be all that's required no?
>
> --
> --
> You received this message because you are subscribed to the Linux Users
> Group.
> To post a message, send email to [email protected]
> To unsubscribe, send email to [email protected]
> For more options, visit our group at
> http://groups.google.com/group/linuxusersgroup
> References can be found at: http://goo.gl/anqri
> Please remember to abide by our list rules (http://tinyurl.com/LUG-Rules)
> ---
> You received this message because you are subscribed to the Google Groups
> "Linux Users Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the Linux Users Group.
To post a message, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit our group at 
http://groups.google.com/group/linuxusersgroup
References can be found at: http://goo.gl/anqri
Please remember to abide by our list rules (http://tinyurl.com/LUG-Rules)
--- 
You received this message because you are subscribed to the Google Groups 
"Linux Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to