mysql error

Hongwei Li hongwei at
Fri Jul 8 13:42:18 UTC 2005


I have a fc3 system: kernel 2.6.11-1.35_FC3, selinux enforced with target
policy 1.17.30-2.96, mysql 3.23.58-16.FC3.1, php 4.3.10-3.2.

After I updated mysql from 3.23.4x to the above version, I cannot connect
mysql database from web by using localhost although I can do it from ssh
command.  The error message is:

Could not connect: Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (13)

If I run setenforce 0, then everything works.  The mysql.sock shows:

# ls -lZ /var/lib/mysql/mysql.sock
srwxrwxrwx  mysql    mysql   root:object_r:mysqld_db_t

How to fix the problem?


Hongwei Li

More information about the fedora-selinux-list mailing list