Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
MariaDB not starting at boot time [Solved]:
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
nelsonwcf
Tux's lil' helper
Tux's lil' helper


Joined: 31 Oct 2012
Posts: 112

PostPosted: Tue Jan 02, 2018 10:33 pm    Post subject: MariaDB not starting at boot time [Solved]: Reply with quote

Hi,

I recently installed Owncloud with MariaDB in my bananapi but I noticed that after rebooting it, mysql service doesn't start, even after adding it to the rc script (rc-update add mysql default). After rebooted, I just go there and manually launch it and it starts normally, showing no errors. Shouldn't it autostart automatically? Am I doing something wrong here?

Also, /var/log/mysql has very basic information only. Is there any way to log the rc bootstrap?

Thank you,
Nelson


Last edited by nelsonwcf on Fri Jan 05, 2018 6:51 pm; edited 1 time in total
Back to top
View user's profile Send private message
nelsonwcf
Tux's lil' helper
Tux's lil' helper


Joined: 31 Oct 2012
Posts: 112

PostPosted: Thu Jan 04, 2018 8:25 pm    Post subject: Reply with quote

Hi,

Let me improve the question so that I can get some help:

- Could the problem be that mysql is trying to start before autofs is started, since the database is located in a different partition? If so, any way for me to start autofs before mysql?
- A second problem is that I can't find a way to get logs on rc scripts. How can I make the rc script logs capture by the syslog?
- Can I make the rc services at boot iterative? I remember get something like this in a different distro so is something gentoo can easily do?

Thanks,
Nelson
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1746

PostPosted: Fri Jan 05, 2018 12:46 am    Post subject: Reply with quote

Openrc is iterative by default, you have to explicitly enable parallel boot if you want it.

3 tricks you can try:
put autofs in a lower runlevel than mariadb (e.g. mariadb in default, autofs in boot), so it will be started before.
edit madiadb's init config file (in /etc/conf.d/), add rc_need="autofs" or whatever that service is called, so openrc knows mariadb depends on another service and will start them in the correct order
Refresh dependency cache with rc-update --update
Back to top
View user's profile Send private message
nelsonwcf
Tux's lil' helper
Tux's lil' helper


Joined: 31 Oct 2012
Posts: 112

PostPosted: Fri Jan 05, 2018 2:22 pm    Post subject: Reply with quote

Yay! Worked. The problem was indeed autofs being loaded after MariaDB.

In my case, the optimal solution was to go to the init script of mariaDB (mysql) and add the rc_need="autofs". This solved the issue.
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1746

PostPosted: Fri Jan 05, 2018 8:22 pm    Post subject: Reply with quote

Don't modify the init script itself, it will be overwriten on the first update without any warning.
Edit /etc/conf.d/mysql instead and put that variable there. These are considered configuration files, and - unlike executables under /etc/init.d - config files are protected.
Emerge will offer you a new version, but you have to explicitly opt-in for those changes to take effect, so you won't be caught off-guard.

Happy to help you
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum