Bug 688438

Summary: mysqld fails to start
Product: [Fedora] Fedora Reporter: Jon Dufresne <jon.dufresne>
Component: mysqlAssignee: Tom Lane <tgl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: hhorak, tgl
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-22 04:05:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Patch to create pid directory at startup none

Description Jon Dufresne 2011-03-17 03:09:30 UTC
Description of problem:

The mysqld service fails to start after successfully installing it via yum.

# service mysqld start

Starting mysqld (via systemctl):  Job failed. See system logs and 'systemctl status' for details.
                                                           [FAILED]


After looking at the log I see the following:

110316 20:02:39 [ERROR] /usr/libexec/mysqld: Can't create/write to file '/var/run/mysqld/mysqld.pid' (Errcode: 2)
110316 20:02:39 [ERROR] Can't start server: can't create PID file: No such file or directory

Creating the directory /var/run/mysqld with permissions for mysql user/group fixed the issue.

Version-Release number of selected component (if applicable):
$ rpm -qa mysql
mysql-5.5.9-2.fc15.x86_64

Comment 1 Jon Dufresne 2011-03-19 18:05:34 UTC
Upon further inspection, it appears that the `/var/run/mysqld` directory I created is removed at restart. This makes a situation such that mysqld will not start at boot. I wrote a patch so the init script checks to see if the directory exists and creates it if necessary. Any feedback is welcome.

Comment 2 Jon Dufresne 2011-03-19 18:06:00 UTC
Created attachment 486400 [details]
Patch to create pid directory at startup

Comment 3 Tom Lane 2011-03-22 04:05:43 UTC

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