1

I am using CentOS 6.8, and want to install mariadb 5.5. I followed all steps in https://mariadb.com/kb/en/mariadb/yum/

vi /etc/yum.repos.d/MariaDB.repo

then inserting

# MariaDB 5.5 CentOS repository list - created 2017-01-05 04:37 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/5.5/centos6-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

then running

sudo yum install MariaDB-server MariaDB-client

the installation when successfully, after that I want to start the database

/etc/init.d/mysql start

unfortunately this error is coming on:

Starting MySQL.170105 08:42:42 mysqld_safe Logging to '/var/lib/mysql/test.mcc.edu.om.err'.
170105 08:42:42 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
/usr/bin/mysqld_safe_helper: Can't create/write to file '' (Errcode: -328342880)
 ERROR!

there is no logs in /var/log/

can someone guide me what might be the problem???

I tried also to chown -R mysql:mysql to all dir relted to mysql in /var/lib or /usr/lib or /usr/share with no success,

any advice please ??

as requested by @Koen van der Rijt

here is the output of /var/log/audit/audit.log after running the /etc/init.d/mysql start

type=USER_CMD msg=audit(1483602976.169:249): user pid=9358 uid=0 auid=0 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='cwd="/" cmd=2F6574632F696E69742E642F6D7973716C207374617274 terminal=pts/0 res=success'
type=CRED_ACQ msg=audit(1483602976.169:250): user pid=9358 uid=0 auid=0 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
type=USER_START msg=audit(1483602976.169:251): user pid=9358 uid=0 auid=0 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_open acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
type=AVC msg=audit(1483602976.350:252): avc:  denied  { setgid } for  pid=9450 comm="mysqld_safe_hel" capability=6  scontext=unconfined_u:system_r:mysqld_safe_t:s0 tcontext=unconfined_u:system_r:mysqld_safe_t:s0 tclass=capability
type=SYSCALL msg=audit(1483602976.350:252): arch=c000003e syscall=116 success=no exit=-1 a0=1 a1=11de600 a2=10000 a3=1 items=0 ppid=9365 pid=9450 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=2 comm="mysqld_safe_hel" exe="/usr/bin/mysqld_safe_helper" subj=unconfined_u:system_r:mysqld_safe_t:s0 key=(null)
type=AVC msg=audit(1483602976.350:253): avc:  denied  { setgid } for  pid=9450 comm="mysqld_safe_hel" capability=6  scontext=unconfined_u:system_r:mysqld_safe_t:s0 tcontext=unconfined_u:system_r:mysqld_safe_t:s0 tclass=capability
type=SYSCALL msg=audit(1483602976.350:253): arch=c000003e syscall=106 success=no exit=-1 a0=1f3 a1=1f3 a2=ca a3=7ffef20f7170 items=0 ppid=9365 pid=9450 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=2 comm="mysqld_safe_hel" exe="/usr/bin/mysqld_safe_helper" subj=unconfined_u:system_r:mysqld_safe_t:s0 key=(null)
type=AVC msg=audit(1483602976.371:254): avc:  denied  { setgid } for  pid=9461 comm="mysqld_safe_hel" capability=6  scontext=unconfined_u:system_r:mysqld_safe_t:s0 tcontext=unconfined_u:system_r:mysqld_safe_t:s0 tclass=capability
type=SYSCALL msg=audit(1483602976.371:254): arch=c000003e syscall=116 success=no exit=-1 a0=1 a1=2818600 a2=10000 a3=1 items=0 ppid=9365 pid=9461 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=2 comm="mysqld_safe_hel" exe="/usr/bin/mysqld_safe_helper" subj=unconfined_u:system_r:mysqld_safe_t:s0 key=(null)
type=AVC msg=audit(1483602976.372:255): avc:  denied  { setgid } for  pid=9461 comm="mysqld_safe_hel" capability=6  scontext=unconfined_u:system_r:mysqld_safe_t:s0 tcontext=unconfined_u:system_r:mysqld_safe_t:s0 tclass=capability
type=SYSCALL msg=audit(1483602976.372:255): arch=c000003e syscall=106 success=no exit=-1 a0=1f3 a1=1f3 a2=ca a3=7ffeeb737ad0 items=0 ppid=9365 pid=9461 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=2 comm="mysqld_safe_hel" exe="/usr/bin/mysqld_safe_helper" subj=unconfined_u:system_r:mysqld_safe_t:s0 key=(null)
type=AVC msg=audit(1483602976.394:256): avc:  denied  { setgid } for  pid=9467 comm="mysqld_safe_hel" capability=6  scontext=unconfined_u:system_r:mysqld_safe_t:s0 tcontext=unconfined_u:system_r:mysqld_safe_t:s0 tclass=capability
type=SYSCALL msg=audit(1483602976.394:256): arch=c000003e syscall=116 success=no exit=-1 a0=1 a1=ee0600 a2=10000 a3=1 items=0 ppid=9365 pid=9467 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=2 comm="mysqld_safe_hel" exe="/usr/bin/mysqld_safe_helper" subj=unconfined_u:system_r:mysqld_safe_t:s0 key=(null)
type=AVC msg=audit(1483602976.394:257): avc:  denied  { setgid } for  pid=9467 comm="mysqld_safe_hel" capability=6  scontext=unconfined_u:system_r:mysqld_safe_t:s0 tcontext=unconfined_u:system_r:mysqld_safe_t:s0 tclass=capability
type=SYSCALL msg=audit(1483602976.394:257): arch=c000003e syscall=106 success=no exit=-1 a0=1f3 a1=1f3 a2=ca a3=7ffc7f986aa0 items=0 ppid=9365 pid=9467 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=2 comm="mysqld_safe_hel" exe="/usr/bin/mysqld_safe_helper" subj=unconfined_u:system_r:mysqld_safe_t:s0 key=(null)
type=USER_END msg=audit(1483602977.229:258): user pid=9358 uid=0 auid=0 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_close acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
type=CRED_DISP msg=audit(1483602977.229:259): user pid=9358 uid=0 auid=0 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'

the problem is solved after disabling SeLinux !!! thank you https://serverfault.com/users/200850/koen-van-der-rijt

5
  • 1
    can u check the selinux context in /var/lib/mysql? or /var/log/audit/audit.log for any selinux related problems. – Koen van der Rijt Jan 5 '17 at 7:06
  • there is no selinux in /var/lib/mysql, also I have disabled the selinux after reading your comments and still the problem there. please go back to my orginal post above, I have edit it with output of /var/log/audit/audit.log – Jaifar Al Shizawi Jan 5 '17 at 8:03
  • the problem is solved, I forget to restart the server after disable the SeLinux. it is working fine now with disabling selinux – Jaifar Al Shizawi Jan 5 '17 at 8:29
  • Please post your solution as an answer instead of editing it into the question. It is perfectly acceptable to accept your own answers – Gerald Schneider Jan 5 '17 at 8:32
  • 1
    Also note that disabling selinux temporarily for debugging purposes or in a development environment is fine, but you should not disable it in a production environment just because it is an easy solution. Instead, configure selinux correctly for your application. It greatly increases security. – Gerald Schneider Jan 5 '17 at 8:34
-1

the problem is solved after disabling SeLinux !!! thank you https://serverfault.com/users/200850/koen-van-der-rijt

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.