[nSLUG] Issues moving MySQL to a different folder in Ubuntu 16.04

Paul Russell prussellster at gmail.com
Wed Aug 10 21:23:39 ADT 2016


Thanks, Robin. I've just tried what you suggested and it worked.

I must have messed something up when I tried the symlink the first time.

Paul

On Wed, Aug 10, 2016 at 9:07 AM, Robin Murray <nibor.yarrum at gmail.com>
wrote:

> Here are my notes for when I did this last (it worked):
>
> sudo service mysql stop
> sudo mv /var/lib/mysql /data
> sudo ln -s /data/mysql /var/lib/mysql
> sudo nano /etc/apparmor.d/usr.sbin.mysqld
>   change occurances of /var/lib/mysql to /data/mysql
> sudo service apparmor restart
> sudo service mysql start
>
>
>
>
> --
> Robin Murray
> Hatchet Lake,
> Nova Scotia
> Canada
>
>
> On 10 August 2016 at 00:45, Paul Russell <prussellster at gmail.com> wrote:
> > Hi
> >
> > Thanks for this. I'll have to give the mount commands a shot (at some
> > point).
> >
> > I did try the symlink. MySQL didn't blow up, but it did just plain
> ignore it
> > and showed the same error as if it wasn't there.
> >
> > Paul
> >
> > On Wed, Aug 10, 2016 at 12:28 AM, Stephen Gregory <nslug at kernelpanic.ca>
> > wrote:
> >>
> >> On 9 August 2016 at 22:14, Paul Russell <prussellster at gmail.com> wrote:
> >> >
> >> > and I have gotten a number of errors when trying to fire up the MySQL
> >> > service after the changes.
> >>
> >> I have seen this general problem before with other software (I don't
> >> use MySQL, or ubuntu 16.04). Somewhere in the myriad of start-up
> >> scripts and conf files the old path is set or hard coded. In the long
> >> run I often find it easier to use a work-around (a hack) and use the
> >> default configuration.
> >>
> >> either
> >> ln -s /sdb1/mysql /var/lib/mysql
> >>
> >> or
> >> mount -o bind /sdb1/mysql /var/lib/mysql
> >> some poorly written software blows up on symlinks, but I doubt mysql
> would
> >>
> >> or maybe
> >> mount /dev/sdb1 /var
> >> plus lots of moving stuff from original var (kinda a pain honestly)
> >>
> >> --
> >> sg
> >> _______________________________________________
> >> nSLUG mailing list
> >> nSLUG at nslug.ns.ca
> >> http://nslug.ns.ca/mailman/listinfo/nslug
> >
> >
> >
> >
> > --
> > Paul Russell
> > Parade Marshall, 2016 Sackville Canada Day Parade
> > President, Sackville Cobequid PC Association
> > ZipSure.ca - Insurance In A Click
> > (902) 830-5043
> >
> > _______________________________________________
> > nSLUG mailing list
> > nSLUG at nslug.ns.ca
> > http://nslug.ns.ca/mailman/listinfo/nslug
> >
> _______________________________________________
> nSLUG mailing list
> nSLUG at nslug.ns.ca
> http://nslug.ns.ca/mailman/listinfo/nslug
>



-- 
Paul Russell
Parade Marshall, 2016 Sackville Canada Day Parade
President, Sackville Cobequid PC Association
ZipSure.ca - Insurance In A Click
(902) 830-5043
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nslug.ns.ca/pipermail/nslug/attachments/20160810/1e814e72/attachment.html>


More information about the nSLUG mailing list