summaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorMingli Yu <mingli.yu@windriver.com>2021-07-30 20:11:28 +0800
committerKhem Raj <raj.khem@gmail.com>2021-07-30 10:42:35 -0700
commit1a4144d954692ad68121d16adae09dc990e8ab1f (patch)
tree67de646d6eb9ba8c15cfc476d87088ee221db79c /meta-oe
parent10152335d1e9b0a1db0ecf358b4cc66e8a028bad (diff)
downloadmeta-openembedded-1a4144d954692ad68121d16adae09dc990e8ab1f.tar.gz
mariadb: redefine log-error item
The log-error item which defined in my.cnf is "/var/log/mysqld.err" previouly and it's not consistent with which created in install_db service file which will call mysql-systemd-start to create the file "/var/log/mysqld.log". And it fails when boot with sysvinit as below: $ service mysqld start Starting MariaDB.210727 04:05:03 mysqld_safe Logging to '/var/log/mysqld.err'. 210727 04:05:03 mysqld_safe Starting mariadbd daemon with databases from /var/lib/mysql /usr/bin/mysqld_safe_helper: Can't create/write to file '/var/log/mysqld.err' (Errcode: 13 "Permission denied") So make the log-error item consistent to fix the above failure and also remove the related workaround when boot with systemd. Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/recipes-dbs/mysql/mariadb.inc5
-rw-r--r--meta-oe/recipes-dbs/mysql/mariadb/my.cnf2
2 files changed, 1 insertions, 6 deletions
diff --git a/meta-oe/recipes-dbs/mysql/mariadb.inc b/meta-oe/recipes-dbs/mysql/mariadb.inc
index 5787ae4bd..7cf08f471 100644
--- a/meta-oe/recipes-dbs/mysql/mariadb.inc
+++ b/meta-oe/recipes-dbs/mysql/mariadb.inc
@@ -168,11 +168,6 @@ do_install() {
168 sed -i -e 's,@BINDIR@,${bindir},g' -e 's,@PREFIX@,${prefix},g' ${D}${systemd_unitdir}/system/mysqld.service \ 168 sed -i -e 's,@BINDIR@,${bindir},g' -e 's,@PREFIX@,${prefix},g' ${D}${systemd_unitdir}/system/mysqld.service \
169 ${D}${systemd_unitdir}/system/install_db.service 169 ${D}${systemd_unitdir}/system/install_db.service
170 170
171 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
172 install -d ${D}${sysconfdir}/tmpfiles.d
173 echo "f /var/log/mysqld.err 0640 mysql mysql -" \
174 > ${D}${sysconfdir}/tmpfiles.d/99-mysqld.conf
175 fi
176 install -d ${D}${bindir} 171 install -d ${D}${bindir}
177 install -m 755 ${WORKDIR}/mysql-systemd-start ${D}${bindir} 172 install -m 755 ${WORKDIR}/mysql-systemd-start ${D}${bindir}
178 install -d ${D}${datadir}/doc/${PN} 173 install -d ${D}${datadir}/doc/${PN}
diff --git a/meta-oe/recipes-dbs/mysql/mariadb/my.cnf b/meta-oe/recipes-dbs/mysql/mariadb/my.cnf
index dc4c172e5..75db46a55 100644
--- a/meta-oe/recipes-dbs/mysql/mariadb/my.cnf
+++ b/meta-oe/recipes-dbs/mysql/mariadb/my.cnf
@@ -10,7 +10,7 @@ user = mysql
10port = 3306 10port = 3306
11socket = /var/lib/mysql/mysql.sock 11socket = /var/lib/mysql/mysql.sock
12pid-file = /var/lib/mysql/mysqld.pid 12pid-file = /var/lib/mysql/mysqld.pid
13log-error = /var/log/mysqld.err 13log-error = /var/log/mysqld.log
14basedir = /usr 14basedir = /usr
15datadir = /var/lib/mysql 15datadir = /var/lib/mysql
16skip-external-locking 16skip-external-locking