Bug 144336 - mysql-server won't start after yum update to 3.23.58-14
Summary: mysql-server won't start after yum update to 3.23.58-14
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: mysql
Version: 3
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tom Lane
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-01-06 04:37 UTC by Edward Samson
Modified: 2013-07-03 03:03 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-09-05 07:25:13 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Edward Samson 2005-01-06 04:37:24 UTC
Description of problem:
after updating mysql-server to 3.23.58-14 from 3.23.58-13(default with
fc3 install), mysqld won't start anymore. 
system-config-services status shows: "mysqld dead but subsys locked"

Version-Release number of selected component (if applicable):
3.23.58-14

Additional info:
mysql log shows:
"050106  9:08:09  /usr/libexec/mysqld: Can't find file:
'./mysql/host.frm' (errno: 13)
050106 09:08:09  mysqld ended"

Comment 1 Tom Lane 2005-01-06 05:45:22 UTC
Apparently you've got a permissions problem on either the /var/lib/mysql/mysql directory 
or the host.frm file therein.  Or maybe on /var/lib/mysql itself.  I can believe that the RPM 
upgrade might have reset the ownership/permissions of /var/lib/mysql to the standard 
settings ... is it possible you are trying to run mysqld under a nondefault account, or some 
such?

Comment 2 Edward Samson 2005-01-06 06:02:18 UTC
I checked the permissions and I don't think that's the problem.
I just performed a clean install of fc3 2 weeks ago and had been using
mysql with the default settings. I'm sure I'm not trying to run mysqld
under a nondefault account unless that was caused by the RPM upgrade.
Removing 3.23.58-14 and going back to 3.23.58-13 gets my server
working again but trying to update again to 3.23.58-14 and the same
problem occurs.

Comment 3 Tom Lane 2005-01-06 06:37:16 UTC
Hmph.  I just tried this on my own machine (which is up-to-date with FC3).  I wiped
mysql, reinstalled the -13 RPMs, then did "yum update" to bring in the -14 RPMs.
Works fine for me.

I see this as the permissions in /var/lib/mysql:

$ ls -la /var/lib/mysql
total 36
drwxr-xr-x   4 mysql mysql 4096 Jan  6 01:27 .
drwxr-xr-x  21 root  root  4096 Jan  5 12:27 ..
drwx------   2 mysql mysql 4096 Jan  6 01:23 mysql
drwx------   2 mysql mysql 4096 Jan  6 01:23 test

Does that match yours?

It could also be that the problem is SELinux related; are you running in enforcement mode, 
and if so does switching to permissive mode fix it?  (sudo /usr/sbin/setenforce 0)  If so 
look in /var/log/messages to see what SELinux is complaining about.  I see no evidence of 
such a problem here, but obviously there's *something* different between your machine 
and mine...

Comment 4 Edward Samson 2005-01-06 09:58:31 UTC
Yup, I've got SELinux enabled in enforcement mode and I think that's
it. I've got this in /var/log/messages:

Jan  6 08:33:01 localhost kernel: audit(1104971581.126:0): avc: 
denied  { read } for  pid=2532 exe=/usr/libexec/mysqld name=host.frm
dev=dm-0 ino=2015359 scontext=user_u:system_r:mysqld_t
tcontext=root:object_r:var_lib_t tclass=file
Jan  6 08:33:10 localhost mysqld: Starting MySQL:  failed

Does that mean anything to you? Unfortunately, I can't try it out
right now. I'll report back as soon as I get the chance to try it.

Thanks

Comment 5 Tom Lane 2005-01-06 15:45:56 UTC
Dan, any idea why SELinux is refusing access to a file under
/var/lib/mysql?  And why the -13 and -14 RPMs would act differently,
when there is no code change anywhere near that?  (For that matter,
why don't I see such a failure here?)

Edward, which selinux-policy-targeted version are you using?

Comment 6 Edward Samson 2005-01-07 00:32:48 UTC
selinux-policy-targeted-1.17.30-2.66

Comment 7 Daniel Walsh 2005-01-07 00:49:35 UTC
What is the file context of /var/lib/mysql?

Should be mysql_db_t.

restorecon -R -v /var/lib/mysql.  If you delete this directory should
recreate it with the correct context.

Dan


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