Bug #98484 /var/run/mysqld not created during .deb installation
Submitted: 4 Feb 2020 16:01 Modified: 20 Feb 2020 19:36
Reporter: Alex Kubacki Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Installing Severity:S3 (Non-critical)
Version:8.0.19 OS:Debian (Stretch)
Assigned to: Lars Tangvald CPU Architecture:Any

[4 Feb 2020 16:01] Alex Kubacki
Starting with 8.0.19-1debian9 from  http://repo.mysql.com/apt/debian/ the folder  /var/run/mysqld/ does not seem to be created anymore upon installation, which results in not being able to run `/usr/sbin/mysqld` directly in the foreground (eg in a Docker image):

2020-02-03T22:22:41.619927Z 0 [ERROR] [MY-010273] [Server] Could not create unix socket lock file /var/run/mysqld/mysqld.sock.lock.
2020-02-03T22:22:41.620288Z 0 [ERROR] [MY-010268] [Server] Unable to setup unix socket lock file.
2020-02-03T22:22:41.621002Z 0 [ERROR] [MY-010119] [Server] Aborting
2020-02-03T22:22:43.177947Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.19) MySQL Community Server - GPL.

This seems to be related to changes intended to make the creation of this folder more robust for this exact use case?
* https://bugs.mysql.com/bug.php?id=95163
* https://github.com/mysql/mysql-server/commit/71f1555b6915488f9f22afc2ecdc7973829b308e

(5.6.47-1debian9 and 5.7.29-1debian9 work as expected)

How to repeat:
I think the quickest way for someone else to reproduce is to build an absolute minimum image to check for the presence of /var/run/mysqld:


FROM debian:stretch

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y wget lsb-release gnupg

RUN wget https://repo.mysql.com/mysql-apt-config_0.8.14-1_all.deb && \
    dpkg -i mysql-apt-config_0.8.14-1_all.deb

RUN apt-get update && \
    apt-get install -y "mysql-server=8.0.19-1debian9"

RUN stat /var/run/mysqld

stat: cannot stat '/var/run/mysqld': No such file or directory
[5 Feb 2020 6:57] Terje Røsten

Thanks for your report!
[20 Feb 2020 19:36] Paul DuBois
Posted by developer:
Fixed in 8.0.20.

For installation using Debian packages, the /var/run/mysqld directory
was not created.