PHP cannot connect to mysql server

dragoran dragoran at feuerpokemon.de
Thu Nov 11 18:36:32 UTC 2004


dragoran schrieb:

> Daniel J Walsh schrieb:
>
>> dragoran wrote:
>>
>>> no it sitill don't work... after a reboot i now get this messages in 
>>> demsg:
>>> audit(1100152360.021:0): avc:  denied  { write } for  pid=2635 
>>> exe=/usr/sbin/httpd name=mysql.sock dev=hda3 ino=309535 
>>> scontext=user_u:system_r:httpd_t tcontext=user_u:object_r:var_lib_t 
>>> tclass=sock_file
>>> audit(1100152677.098:0): avc:  denied  { append } for  pid=4078 
>>> exe=/usr/libexec/mysqld path=/var/log/mysqld.log dev=hda3 ino=765672 
>>> scontext=root:system_r:mysqld_t tcontext=system_u:object_r:var_log_t 
>>> tclass=file
>>> audit(1100152677.099:0): avc:  denied  { append } for  pid=4078 
>>> exe=/usr/libexec/mysqld path=/var/log/mysqld.log dev=hda3 ino=765672 
>>> scontext=root:system_r:mysqld_t tcontext=system_u:object_r:var_log_t 
>>> tclass=file
>>> audit(1100152682.751:0): avc:  denied  { write } for  pid=2636 
>>> exe=/usr/sbin/httpd name=mysql.sock dev=hda3 ino=309535 
>>> scontext=user_u:system_r:httpd_t 
>>> tcontext=root:object_r:mysqld_var_run_t tclass=sock_file
>>> audit(1100152683.427:0): avc:  denied  { write } for  pid=2636 
>>> exe=/usr/sbin/httpd name=mysql.sock dev=hda3 ino=309535 
>>> scontext=user_u:system_r:httpd_t 
>>> tcontext=root:object_r:mysqld_var_run_t tclass=sock_file
>>> audit(1100152683.978:0): avc:  denied  { write } for  pid=2636 
>>> exe=/usr/sbin/httpd name=mysql.sock dev=hda3 ino=309535 
>>> scontext=user_u:system_r:httpd_t 
>>> tcontext=root:object_r:mysqld_var_run_t tclass=sock_file
>>> audit(1100152755.278:0): avc:  denied  { write } for  pid=2637 
>>> exe=/usr/sbin/httpd name=mysql.sock dev=hda3 ino=309535 
>>> scontext=user_u:system_r:httpd_t 
>>> tcontext=root:object_r:mysqld_var_run_t tclass=sock_file
>>> audit(1100152756.063:0): avc:  denied  { write } for  pid=2637 
>>> exe=/usr/sbin/httpd name=mysql.sock dev=hda3 ino=309535 
>>> scontext=user_u:system_r:httpd_t 
>>> tcontext=root:object_r:mysqld_var_run_t tclass=sock_file
>>> mysql cannot access the log file and httpd still canncot connect to 
>>> the mysql socket ...
>>>
>>> -- 
>>> fedora-selinux-list mailing list
>>> fedora-selinux-list at redhat.com
>>> http://www.redhat.com/mailman/listinfo/fedora-selinux-list
>>
>>
>>
>> Looks like you have it mislabled.
>>
>> Did you do a
>>
>> rpm -q -l mysql  | restorecon -R -f -
>>
>> ????
>>
>> The labels on a few files are wrong.
>>
>> Dan
>>
>> -- 
>> fedora-selinux-list mailing list
>> fedora-selinux-list at redhat.com
>> http://www.redhat.com/mailman/listinfo/fedora-selinux-list
>>
>>
> php now works but mysql still can't write to its log file:
> -rw-r-----  mysql    mysql    system_u:object_r:var_log_t      mysqld.log
> seems to be wrong but how do i change it? i have run rpm -q -l mysql  
> | restorecon -R -f - but it  did'nt help.
>
> -- 
> fedora-selinux-list mailing list
> fedora-selinux-list at redhat.com
> http://www.redhat.com/mailman/listinfo/fedora-selinux-list
>
>
 restorecon -R -v /var/log solved it




More information about the fedora-selinux-list mailing list