0

hey guys hopefully someone has the answers for this but these are my errors

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

and in my /etc/log/mysqld.log

150403  0:30:26 [Note] /usr/libexec/mysqld: Shutdown complete
150403 00:30:26  mysqld ended
150403 00:58:32  mysqld started
150403  0:58:32 [Warning] Can't create test file /mnt/xfsdisk/mysql/cts4348-node-8.lower-test
150403  0:58:32 [Warning] Can't create test file /mnt/xfsdisk/mysql/cts4348-node-8.lower-test
/usr/libexec/mysqld: Can't change dir to '/mnt/xfsdisk/mysql/' (Errcode: 13)
150403  0:58:32 [ERROR] Aborting

and this is my.cnf file

[mysqld]
datadir=/mnt/xfsdisk/mysql/
socket=/mnt/xfsdisk/mysql/mysql.sock
user=mysql

the funny part is, it was working before, then stop all of the sudden trying to install mantis

I tried these commands to fix them, but still same problem

  926  semanage fcontext -a -t mysqld_db_t /mnt/xfsdisk/mysql/
  927  semanage fcontext -a -t mysqld_db_t /mnt/xfsdisk/
       restorecon -Rv /mnt/xfsdisk/mysql/
        semanage fcontext -a -t mysqld_db_t "/mnt/xfsdisk/mysql(/.*)?"

nothing seems to work? any ideas where to point me? (also I do not have a [client] in the my.cnf file.

i am also running centos 5

0

1 Answer 1

0

Try to run "restorecon -RF " and restart MySQL service.

If this does not work, try to set SELINUX into permissive mode by using "setenforce 0". If that work, your SELINUX policy need some other changes.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .