MySQL service doesn't create /var/run/mysqld and thus fails to start

Bug #1436123 reported by Benjamin Xiao
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
mysql-5.6 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I am running Ubuntu 15.04 which recently upgraded to MySQL 5.6. Ever since then, it's been unable to start on boot because /var/run/mysqld doesn't exist. Doing a sudo service mysql start just hangs. Creating the directory and assigning mysql:root and 755 as permissions allows mysql to start, but the folder is destroyed on every reboot.

Whenever /var/run/mysqld doesn't exist, these lines show up in /var/log/mysql/error.log:
==========================================================================
2015-03-24 17:43:15 1178 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
2015-03-24 17:43:15 1178 [Note] - '127.0.0.1' resolves to '127.0.0.1';
2015-03-24 17:43:15 1178 [Note] Server socket created on IP: '127.0.0.1'.
2015-03-24 17:43:15 1178 [ERROR] Can't start server : Bind on unix socket: No such file or directory
2015-03-24 17:43:15 1178 [ERROR] Do you already have another mysqld server running on socket: /var/run/mysqld/mysqld.sock ?
2015-03-24 17:43:15 1178 [ERROR] Aborting

systemctl status mysql shows:
==========================================================================
Mar 24 22:43:33 benxiao-ubuntu01 systemd[1]: Starting MySQL Community Server...
Mar 24 22:43:33 benxiao-ubuntu01 mysqld_safe[1030]: 150324 22:43:33 mysqld_safe Can't log to error log and syslog at the same time. Remove all --log-error configuration options for --syslog to take effect.
Mar 24 22:43:33 benxiao-ubuntu01 mysqld_safe[1030]: 150324 22:43:33 mysqld_safe Logging to '/var/log/mysql/error.log'.
Mar 24 22:43:33 benxiao-ubuntu01 mysqld_safe[1030]: mkdir: cannot create directory ‘/var/run/mysqld’: Permission denied
Mar 24 22:43:33 benxiao-ubuntu01 mysqld_safe[1030]: chown: cannot access ‘/var/run/mysqld’: No such file or directory
Mar 24 22:43:33 benxiao-ubuntu01 mysqld_safe[1030]: chmod: cannot access ‘/var/run/mysqld’: No such file or directory
Mar 24 22:43:33 benxiao-ubuntu01 mysqld_safe[1030]: 150324 22:43:33 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: mysql-server-5.6 5.6.23-1~exp1~ubuntu4
ProcVersionSignature: Ubuntu 3.19.0-10.10-generic 3.19.2
Uname: Linux 3.19.0-10-generic x86_64
ApportVersion: 2.16.2-0ubuntu4
Architecture: amd64
Date: Tue Mar 24 17:47:58 2015
InstallationDate: Installed on 2015-02-15 (37 days ago)
InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Alpha amd64 (20150119)
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: mysql-5.6
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Benjamin Xiao (ben-r-xiao) wrote :
Revision history for this message
Benjamin Xiao (ben-r-xiao) wrote :

Here is the relevant logs.

Whenever /var/run/mysqld doesn't exist, these lines show up in /var/log/mysql/error.log:

2015-03-24 17:43:15 1178 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
2015-03-24 17:43:15 1178 [Note] - '127.0.0.1' resolves to '127.0.0.1';
2015-03-24 17:43:15 1178 [Note] Server socket created on IP: '127.0.0.1'.
2015-03-24 17:43:15 1178 [ERROR] Can't start server : Bind on unix socket: No such file or directory
2015-03-24 17:43:15 1178 [ERROR] Do you already have another mysqld server running on socket: /var/run/mysqld/mysqld.sock ?
2015-03-24 17:43:15 1178 [ERROR] Aborting

description: updated
Revision history for this message
Benjamin Xiao (ben-r-xiao) wrote :
Revision history for this message
iNZT (nztinjected) wrote :

run ubuntu with upstart from recovery grub menu, the replace of upstart is buggy

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mysql-5.6 (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.