service mysql start on Red Hat Enterprise Linux ES release 4 (Nahant)

Michael L Torrie torriem at chem.byu.edu
Mon Oct 2 08:58:10 MDT 2006


On Mon, 2006-10-02 at 06:51 -0600, C. Ed Felt wrote:
> How to hose your mysql installation on the latest version of RHE:
> 
>    1. Install latest version of RHE [Red Hat Enterprise Linux ES release
>       4 (Nahant)], then "yum update all"
>    2. "rpm -e" on all mysql packages (of course RHE only supports MySQL
>       4 :( )!!!!
>    3. Install latest RHE mysql rpms from mysql.com:
>       MySQL-client-standard-5.0.24-0.rhel4.i386.rpm 
>       MySQL-shared-standard-5.0.24-0.rhel4.i386.rpm
>       MySQL-devel-standard-5.0.24-0.rhel4.i386.rpm  
>       MySQL-standard-debuginfo-5.0.24-0.rhel4.i386.rpm
>       MySQL-server-standard-5.0.24-0.rhel4.i386.rpm 
>       MySQL-test-standard-5.0.24-0.rhel4.i386.rpm
>       MySQL-shared-compat-5.0.24-0.rhel4.i386.rpm
>    4. Reboot, mysql is not running :(.
> 
> What I have discovered so far:
> 
>     * If I am sshed in to the server as root I can start mysql with no
>       problems:
>       mysql service start
>       tail /var/log/messages
>       Oct  2 07:28:14 mt11 lsb_log_message:  succeeded
>     * If I just "reboot" the server, mysql does not start (though it is
>       set to start on boot):
>       tail /var/log/messages
>       Oct  2 07:25:42 mt11 kernel: audit(1159788342.728:0): avc: 
>       denied  { append } for  pid=4756 exe=/usr/sbin/mysqld
>       path=/var/lib/mysql/mt11.caflo.com.err dev=dm-3 ino=1687799
>       scontext=user_u:system_r:mysqld_t tcontext=root:object_r:var_lib_t
>       tclass=file
>       Oct  2 07:25:42 mt11 kernel: audit(1159788342.728:0): avc: 
>       denied  { append } for  pid=4756 exe=/usr/sbin/mysqld
>       path=/var/lib/mysql/mt11.caflo.com.err dev=dm-3 ino=1687799
>       scontext=user_u:system_r:mysqld_t tcontext=root:object_r:var_lib_t
>       tclass=file
>       Oct  2 07:25:42 mt11 kernel: audit(1159788342.735:0): avc: 
>       denied  { write } for  pid=4756 exe=/usr/sbin/mysqld name=mysql
>       dev=dm-3 ino=1687745 scontext=user_u:system_r:mysqld_t
>       tcontext=root:object_r:var_lib_t tclass=dir
>       Oct  2 07:25:42 mt11 kernel: audit(1159788342.766:0): avc: 
>       denied  { read write } for  pid=4756 exe=/usr/sbin/mysqld
>       name=ibdata1 dev=dm-3 ino=1687800
>       scontext=user_u:system_r:mysqld_t tcontext=root:object_r:var_lib_t
>       tclass=file
>       Oct  2 07:26:17 mt11 lsb_log_message:  failed
> 
>  From preliminary googling, looks like it's an SE Linux issue.  Any 
> suggestions?

While learning about selinux and how to properly configure it, boot with
"selinux=0".  Redhat ships with selinux rules for their own rpm of
mysql, but unfortunately the official MySQL rpms don't work well with
those existing rules.  You'll need to create your own, basically.
Perhaps MySQL.com ought to do that, since these are their official
packages.  But selinux is still a little complicated at the moment.

Michael


> 




More information about the PLUG mailing list