aboutsummaryrefslogtreecommitdiff
path: root/utils/mariadb/files/mysqld.init
Commit message (Collapse)AuthorAge
* mariadb: minor whitespace and typo fixesMichael Heimpold2023-12-22
| | | | Signed-off-by: Michael Heimpold <mhei@heimpold.de>
* mariadb: Drop unused rundir fix socket dir permsMichal Hrusecky2022-10-24
| | | | | | | | | We had been creating "rundir" but it was never used, probably leftover from some removed function. At the same time, we were setting quite strict rights to the socket directory (while comments sugested otherwise). Signed-off-by: Michal Hrusecky <michal@hrusecky.net>
* mariadb: Check and fix datadir owner issues during upgradeMichal Hrusecky2022-01-14
| | | | | | | | | If you are migrating to MariaDB package, you might have old datadir stored somewhere using different setup with different users. If you trust us enough to enable autoupgrade, you probably trust us enough to chown your datadir as well. This can prevent some potential issues. Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
* mariadb: Init script improvementsMichal Hrusecky2021-11-29
| | | | | | | | | Update init script so other user/group can be used. Also make sure that init script can actually create an empty database instead of forcing the user to do it by hand. Other new feature is taking care of migration of the database when upgrading the database. Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
* mariadb: Cleanup and bumpMichal Hrusecky2020-10-14
| | | | | | | | Remove few no longer needed bits - like checking that datadir is defined or mysqld_safe from server package and bumping revision after all the init script cleanups. Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
* mariadb: Use procd and run as userMichal Hrusecky2020-10-14
| | | | | | Drop mysqld_safe and use procd instead. Also run as a user. Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
* mariadb: Do not use mysqladmin in initMichal Hrusecky2020-10-13
| | | | | | | Rewrite init script as mysqladmin requires access to the MySQL which is hard to guarantee. Use standard signals instead. Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
* mariadb: Use defaults and change default datadirMichal Hrusecky2020-10-13
| | | | | | | | | | Use /srv/mysql as default datadir as /var/lib/mysql is in tmpfs. This doesn't affect any existing setup as up till now it had to be always specified in configuration. That is addressed in the second part of this commit - init script now uses even defaults as compiled in MariaDB so not everything has to be specified in configuration file. Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
* mariadb: Add shellcheck disable into init scriptMichal Hrusecky2020-10-02
| | | | | | | | | On few places, shellcheck gets confused by how some OpenWrt functions work - especially load ones. Also on few places there are $options variables that need not to be globbed. Could be rewritten better not to need them, but I'll do major rewrites later in separate pull request. Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
* mariadb: Use double quotes where possibleMichal Hrusecky2020-10-02
| | | | | | | | Just to make sure, add double quotes around strings and various variables. In some cases it could prevent some issues, in other cases it is just a good practice. Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
* mariadb: Handle non-existent logger in initMichal Hrusecky2020-10-01
| | | | | | Make sure init script has a fallback when logger is not available. Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
* mariadb: switch init to mysqld_safe and mysqladminSebastian Kemper2020-05-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | mysqld_safe is the recommended way to start the server on non-systemd systems ([1]). For instance, it has a crash detection with auto-restart function, can update ulimits, setup core files, set the niceness of the server etc. It looks like it could also be helpful when trying to set up clusters. It's maintained upstream and adding it means we don't need to add these features into our init script. mysqld_safe is a script itself, so it's added to conffiles in case users want to edit it. It can't be run under procd, so the init script is converted to a normal System V type. To stop the server and to reload the privileges tables mysqladmin is used. To that end mysqladmin is moved into the server package. While changing the init script, the Debian init script was used for ideas. It wasn't copied verbatim and adapted a bit here and there. Thanks to whoever wrote it! This commit removes the support for starting the service as a user other than "mariadb". This makes the init script simpler. If anybody wants to play around with the user then it's up to them to fix the permissions. [1] https://mariadb.com/kb/en/mysqld_safe/ Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
* mariadb: bump to major version 10.4Sebastian Kemper2019-11-17
| | | | | | | | | | | | | | | | Highlights: - Bump from 10.2.26 to 10.4.10 - auth_pam got replaced with never version, old one still available as auth_pam_v1 - semisync plugins were merged into the core - Upstream now installs symlinks for binaries with mariadb prefix. To accommodate that this commit updates Package/mariadb/install/bin accordingly. - Patches are updated with new ones from Debian and Arch (thanks!) - libedit patch dropped because it's upstream now. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
* mariadb: init script updateSebastian Kemper2019-05-10
| | | | | | | | | | - added trailing '--' to logger to make it foolproof - user is extracted from config instead of using hard-coded value - log directory is now also extracted from config (if set) - directory creation is now done via awk script (more robust) - improved log messages Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
* mariadb: update init script to use uciSebastian Kemper2018-12-15
| | | | | | | | | Does away with /etc/default/mysqld, introduces uci configuration instead. The init script receives some further brushing up, like a function (copied from Debian) to get mysqld configuration parameters easily and quickly. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
* mariadb: convert init script to procdSebastian Kemper2018-06-28
| | | | | | | Also create a user "mariadb" and use it for running the server. And add possibility to easily add command line args. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
* mariadb: fix /etc/mysql setupSebastian Kemper2018-05-13
| | | | | | | | - create directory /etc/mysql/conf.d as without it the server refuses to start - correct the path to my.cnf in the init script Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
* mariadb: new packageSebastian Kemper2018-04-28
MariaDB is a drop-in replacement for MySQL. This commit adds a current and stable version of MariaDB to the tree. Quite a few ideas/patches were copied from Alpine Linux, Busybox Buildroot and Debian. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>