Bug 1042644 - MySQL unable to start (after unclean shutdown) because /etc/init.d/mysqld wrongly check /var/lib/mysql/mysql.sock by -S and not by lsof
Summary: MySQL unable to start (after unclean shutdown) because /etc/init.d/mysqld wro...
Keywords:
Status: CLOSED DUPLICATE of bug 1037650
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: mysql
Version: 6.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Honza Horak
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-13 00:43 UTC by Milan Kerslager
Modified: 2013-12-13 08:36 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-13 08:36:37 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Milan Kerslager 2013-12-13 00:43:13 UTC
In mysql-server-5.1.71-1.el6.x86_64 there is a check in init script:

[ -S /var/lib/mysql/mysql.sock ]

When the socket exist (unclean shutdown for example), the mysqld did not start because this check by printing a message that this socket is in use, which is wrong. There should be check by lsof instead:

# lsof /var/lib/mysql/mysql.sock 
COMMAND   PID  USER   FD   TYPE             DEVICE SIZE/OFF   NODE NAME
mysqld  14235 mysql   12u  unix 0xffff880214ec0980      0t0 169827 /var/lib/mysql/mysql.sock

Only lsof could tell if the socket is really in use or not. If yes, the output above tells. If the socket is not in use, the output above is empty.

The workaround is to delete the socket manually before trying to start MySQL daemon.

Comment 1 Honza Horak 2013-12-13 08:36:37 UTC
Thank you for reporting, this is most probably the same issue as bug #1037650, so marking as duplicate.

*** This bug has been marked as a duplicate of bug 1037650 ***


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