aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/mysql/mariadb
diff options
context:
space:
mode:
authorRoy Li <rongqing.li@windriver.com>2015-02-06 13:59:46 +0800
committerMartin Jansa <Martin.Jansa@gmail.com>2015-02-12 19:35:39 +0100
commit9bb362cb3fdf3c28c6bb1f510fd303b5297c218f (patch)
tree9d8ea038e3e1bd517a7a747e3dee6964791e5101 /meta-oe/recipes-support/mysql/mariadb
parentf83d255736a43bbd2bdef702c5aa08936b8343c6 (diff)
downloadmeta-openembedded-9bb362cb3fdf3c28c6bb1f510fd303b5297c218f.tar.gz
meta-openembedded-9bb362cb3fdf3c28c6bb1f510fd303b5297c218f.tar.bz2
meta-openembedded-9bb362cb3fdf3c28c6bb1f510fd303b5297c218f.zip
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>
Diffstat (limited to 'meta-oe/recipes-support/mysql/mariadb')
-rw-r--r--meta-oe/recipes-support/mysql/mariadb/my.cnf2
-rw-r--r--meta-oe/recipes-support/mysql/mariadb/mysqld.service1
2 files changed, 2 insertions, 1 deletions
diff --git a/meta-oe/recipes-support/mysql/mariadb/my.cnf b/meta-oe/recipes-support/mysql/mariadb/my.cnf
index 876ce366a..28d389922 100644
--- a/meta-oe/recipes-support/mysql/mariadb/my.cnf
+++ b/meta-oe/recipes-support/mysql/mariadb/my.cnf
@@ -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
diff --git a/meta-oe/recipes-support/mysql/mariadb/mysqld.service b/meta-oe/recipes-support/mysql/mariadb/mysqld.service
index 18ad8d54d..757d0386c 100644
--- a/meta-oe/recipes-support/mysql/mariadb/mysqld.service
+++ b/meta-oe/recipes-support/mysql/mariadb/mysqld.service
@@ -4,6 +4,7 @@ After=syslog.target
After=network.target
[Service]
+PIDFile=/var/lib/mysql/mysqld.pid
Type=simple
User=mysql
Group=mysql