Bug 141434 - cannot start mysqld
cannot start mysqld
Status: CLOSED DUPLICATE of bug 141062
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted (Show other bugs)
3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-11-30 21:23 EST by Florin Andrei
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-21 14:07:22 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Florin Andrei 2004-11-30 21:23:32 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5)
Gecko/20041111 Firefox/1.0

Description of problem:
yum'ed up mysql-server, then as root tried to "/etc/init.d/mysql start".
It failed, and the errors were:

Nov 30 18:18:22 rivendell mysql_install_db: Preparing db table
Nov 30 18:18:22 rivendell mysql_install_db: Preparing host table
Nov 30 18:18:22 rivendell mysql_install_db: Preparing user table
Nov 30 18:18:22 rivendell mysql_install_db: Preparing func table
Nov 30 18:18:22 rivendell mysql_install_db: Preparing tables_priv table
Nov 30 18:18:22 rivendell mysql_install_db: Preparing columns_priv table
Nov 30 18:18:22 rivendell mysql_install_db: Installing all prepared tables
Nov 30 18:18:22 rivendell kernel: audit(1101867502.447:0): avc: 
denied  { read } for  pid=3614 exe=/usr/libexec/mysqld
path=/tmp/sh-thd-1101867567 (deleted) dev=hda4 ino=736026
scontext=root:system_r:mysqld_t tcontext=root:object_r:tmp_t
tclass=fileNov 30 18:18:22 rivendell mysql_install_db: 041130 18:18:22
Nov 30 18:18:22 rivendell mysql_install_db:
Nov 30 18:18:22 rivendell mysql_install_db: /usr/libexec/mysqld:
Shutdown Complete
Nov 30 18:18:22 rivendell mysql_install_db:
Nov 30 18:18:22 rivendell mysql_install_db: To start mysqld at boot
time you have to copy support-files/mysql.server
Nov 30 18:18:22 rivendell mysql_install_db: to the right place for
your system
Nov 30 18:18:22 rivendell mysql_install_db:
Nov 30 18:18:22 rivendell mysql_install_db: PLEASE REMEMBER TO SET A
PASSWORD FOR THE MySQL root USER !
Nov 30 18:18:22 rivendell mysql_install_db: This is done with:
Nov 30 18:18:22 rivendell mysql_install_db: /usr/bin/mysqladmin -u
root  password 'new-password'
Nov 30 18:18:22 rivendell mysql_install_db: /usr/bin/mysqladmin -u
root -h rivendell.home.local  password 'new-password'
Nov 30 18:18:22 rivendell mysql_install_db: See the manual for more
instructions.
Nov 30 18:18:22 rivendell mysql_install_db:
Nov 30 18:18:22 rivendell mysql_install_db: You can start the MySQL
daemon with:
Nov 30 18:18:22 rivendell mysql_install_db: cd /usr ;
/usr/bin/safe_mysqld &
Nov 30 18:18:22 rivendell mysql_install_db:
Nov 30 18:18:22 rivendell mysql_install_db: You can test the MySQL
daemon with the benchmarks in the 'sql-bench' directory:
Nov 30 18:18:22 rivendell mysql_install_db: cd sql-bench ; run-all-tests
Nov 30 18:18:22 rivendell mysql_install_db:
Nov 30 18:18:22 rivendell mysql_install_db: Please report any problems
with the /usr/bin/mysqlbug script!
Nov 30 18:18:22 rivendell mysql_install_db:
Nov 30 18:18:22 rivendell mysql_install_db: The latest information
about MySQL is available on the web at
Nov 30 18:18:22 rivendell mysql_install_db: http://www.mysql.com
Nov 30 18:18:22 rivendell mysql_install_db: Support MySQL by buying
support/licenses at https://order.mysql.com
Nov 30 18:18:22 rivendell mysql_install_db:
Nov 30 18:18:22 rivendell mysqld: Initializing MySQL database:  succeeded
Nov 30 18:18:22 rivendell kernel: audit(1101867502.695:0): avc: 
denied  { append } for  pid=3645 exe=/usr/libexec/mysqld
path=/var/log/mysqld.log dev=hda4 ino=3729729
scontext=root:system_r:mysqld_t tcontext=root:object_r:var_log_t
tclass=file
Nov 30 18:18:22 rivendell kernel: audit(1101867502.696:0): avc: 
denied  { append } for  pid=3645 exe=/usr/libexec/mysqld
path=/var/log/mysqld.log dev=hda4 ino=3729729
scontext=root:system_r:mysqld_t tcontext=root:object_r:var_log_t
tclass=file
Nov 30 18:18:32 rivendell mysqld: Starting MySQL:  failed


Version-Release number of selected component (if applicable):
selinux-policy-targeted-1.17.30-2.34

How reproducible:
Always

Steps to Reproduce:
1.install mysql-server
2.start the mysql service
3.
    

Actual Results:  it fails
Nov 30 18:22:15 rivendell kernel: audit(1101867735.240:0): avc: 
denied  { append } for  pid=3775 exe=/usr/libexec/mysqld
path=/var/log/mysqld.log dev=hda4 ino=3729729
scontext=root:system_r:mysqld_t tcontext=root:object_r:var_log_t
tclass=file
Nov 30 18:22:15 rivendell kernel: audit(1101867735.240:0): avc: 
denied  { append } for  pid=3775 exe=/usr/libexec/mysqld
path=/var/log/mysqld.log dev=hda4 ino=3729729
scontext=root:system_r:mysqld_t tcontext=root:object_r:var_log_t
tclass=file

Expected Results:  mysqld should run fine

Additional info:
Comment 1 Daniel Walsh 2004-12-01 08:45:47 EST
First off /var/log/mysqld.log is labeled incorrectly.  It should be
mysqld_log_t.  You can execute restorecon /var/log/mysqld.log to fix
this. I don't know how it got mislabeled.

The initialization of the mysql database has been reported and is
being worked on.  Hopefully a new version of mysqld will be available
shortly.  For the time being you can execute
setenforce 0
mysql_install_db
setenforce 1 
and everything should work.
Comment 2 Florin Andrei 2004-12-01 21:26:42 EST
Thanks Daniel, your suggestions worked.
Just running restorecon /var/log/mysqld.log was not enough, i had to
also go through the initialization procedure you described
(setenforce...).

Now mysql seems to be working fine.
Comment 3 Daniel Walsh 2004-12-02 10:50:25 EST

*** This bug has been marked as a duplicate of 141062 ***
Comment 4 Stuart Clark 2004-12-06 01:04:08 EST
I am running mysql-server-4.1.7-0FC3 rpms from mysql.com, along with
mysql-shared-compat-3.23.58-1 rpm created against instructions that
can be found at fedoranews.org.  

I encountered this problem when after yum upgrading various rpms,  I
do not know when it broke or how.  Doing the initialisation procedurs
described in comment #1
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=141434#c1 fixed
this problem.
Comment 5 Red Hat Bugzilla 2006-02-21 14:07:22 EST
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

Note You need to log in before you can comment on or make changes to this bug.