mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-01-01 13:58:06 +00:00
mariadb: make it be able to work with SELinux
1. change the datadir from /var/mysql to /var/lib/mysql 2. after creating datedir, restorecon on it, make SELinux be able to work 3. Add the PIDFile for systemd unit file, otherwise systemctl can not stop mysqld Signed-off-by: Roy Li <rongqing.li@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
parent
f83d255736
commit
9bb362cb3f
|
|
@ -128,6 +128,7 @@ pkg_postinst_${PN}-server () {
|
|||
|
||||
mysql_install_db --basedir=${prefix} --user=mysql
|
||||
|
||||
[ -x /sbin/restorecon ] && /sbin/restorecon -RF /var/lib/mysql
|
||||
}
|
||||
|
||||
PACKAGES = "${PN}-dbg ${PN} \
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ socket = /var/lib/mysql/mysql.sock
|
|||
pid-file = /var/lib/mysql/mysqld.pid
|
||||
log-error = /var/log/mysqld.err
|
||||
basedir = /usr
|
||||
datadir = /var/mysql
|
||||
datadir = /var/lib/mysql
|
||||
skip-external-locking
|
||||
skip-networking
|
||||
ignore-builtin-innodb
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ After=syslog.target
|
|||
After=network.target
|
||||
|
||||
[Service]
|
||||
PIDFile=/var/lib/mysql/mysqld.pid
|
||||
Type=simple
|
||||
User=mysql
|
||||
Group=mysql
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user