[yocto] How to get mysqy/mariadb to start on powerup.

Greg Wilson-Lindberg GWilson at sakuraus.com
Fri Mar 16 14:58:23 PDT 2018


> -----Original Message-----
> From: Khem Raj [mailto:raj.khem at gmail.com]
> Sent: Friday, March 16, 2018 02:51 PM
> To: Greg Wilson-Lindberg <GWilson at sakuraus.com>
> Cc: yocto at yoctoproject.org
> Subject: Re: [yocto] How to get mysqy/mariadb to start on powerup.
> 
> On Fri, Mar 16, 2018 at 2:22 PM, Greg Wilson-Lindberg <GWilson at sakuraus.com>
> wrote:
> >> -----Original Message-----
> >> From: Khem Raj [mailto:raj.khem at gmail.com]
> >> Sent: Friday, March 16, 2018 02:16 PM
> >> To: Greg Wilson-Lindberg <GWilson at sakuraus.com>
> >> Cc: yocto at yoctoproject.org
> >> Subject: Re: [yocto] How to get mysqy/mariadb to start on powerup.
> >>
> >> On Fri, Mar 16, 2018 at 2:10 PM, Greg Wilson-Lindberg
> >> <GWilson at sakuraus.com>
> >> wrote:
> >> >> -----Original Message-----
> >> >> From: Khem Raj [mailto:raj.khem at gmail.com]
> >> >> Sent: Friday, March 16, 2018 11:55 AM
> >> >> To: Greg Wilson-Lindberg <GWilson at sakuraus.com>
> >> >> Cc: yocto at yoctoproject.org
> >> >> Subject: Re: [yocto] How to get mysqy/mariadb to start on powerup.
> >> >>
> > ....
> > ....
> > ....
> >> >
> >> > I've run journalctl on both install_db.service & mysqld.service.
> >> > mysqld comes
> >> back with no entries. install_db comes back with a line each for
> >> Starting and Started Install MySQL Community Server Database.
> >> >
> >> > systemctl status returns exited success for install_db, for mysqld it reports
> Active:
> >> inactive (dead).
> >> >
> >> > systemctl list-unit-files shows install_db as enabled and mysqld as disabled.
> >> >
> >> > I was able to start mysqld with systemctl start and it showed
> >> > running with
> >> systemctl status & ps. But it did not restart after a reboot.
> >>
> >> can you try
> >>
> >> systemctl enable mysqld
> >>
> >> this should enable it to start on boot.
> >
> > That did create a link and it started on reboot.
> >
> 
> OK thats expected see ./meta-oe/recipes-dbs/mysql/mariadb.inc
> 
> SYSTEMD_PACKAGES = "${PN}-server ${PN}-setupdb"
> SYSTEMD_SERVICE_${PN}-server = "mysqld.service"
> SYSTEMD_AUTO_ENABLE_${PN}-server ?= "disable"
> 
> its disabled on install. you can set it to be enabled via a bbappend in your layer

So it seems that I should do a .bbappend with it enabled then.
Thanks,
Greg


> 
> > I take it that something is happening in install_db and among other things that link
> is not getting created?
> 
> its calling
> 
> mysql-systemd-start pre
> 
> but it depends on mysqld.service so I wonder if it was not working because
> mysqld.service was disabled so may be now it works


More information about the yocto mailing list