Skip to content
This repository was archived by the owner on Feb 13, 2023. It is now read-only.
This repository was archived by the owner on Feb 13, 2023. It is now read-only.

Docker Image is not starting MySQL - 'Can't open and lock privilege tables: error 140' #1497

@geerlingguy

Description

@geerlingguy

Issue Type

  • Bug Report

Your OS

  • macOS (10.12.6)

Full console output / Summary

After a docker-compose up, using the Drupal VM docker image doesn't have MySQL running—see the output below (after logging into the Drupal VM container with docker exec -it [container] /bin/bash):

root@2de0a967ad9a:/# systemctl status mysql
● mysql.service - LSB: Start and stop the mysql database server daemon
   Loaded: loaded (/etc/init.d/mysql)
   Active: failed (Result: exit-code) since Wed 2017-08-02 14:03:28 UTC; 1min 58s ago
  Process: 48 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)

Aug 02 14:02:57 2de0a967ad9a systemd[1]: Starting LSB: Start and stop the mysql database server daemon...
Aug 02 14:03:28 2de0a967ad9a /etc/init.d/mysql[1136]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
Aug 02 14:03:28 2de0a967ad9a /etc/init.d/mysql[1136]: [61B blob data]
Aug 02 14:03:28 2de0a967ad9a /etc/init.d/mysql[1136]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Aug 02 14:03:28 2de0a967ad9a /etc/init.d/mysql[1136]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Aug 02 14:03:28 2de0a967ad9a /etc/init.d/mysql[1136]: 
Aug 02 14:03:28 2de0a967ad9a mysql[48]: Starting MySQL database server: mysqld . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . failed!
Aug 02 14:03:28 2de0a967ad9a systemd[1]: mysql.service: control process exited, code=exited status=1
Aug 02 14:03:28 2de0a967ad9a systemd[1]: Failed to start LSB: Start and stop the mysql database server daemon.
Aug 02 14:03:28 2de0a967ad9a systemd[1]: Unit mysql.service entered failed state.

Checking MySQL's error log, I find:

170802 14:02:59 InnoDB: 5.5.57 started; log sequence number 1595926
170802 14:02:59 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
170802 14:02:59 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
170802 14:02:59 [Note] Server socket created on IP: '0.0.0.0'.
170802 14:02:59 [ERROR] Fatal error: Can't open and lock privilege tables: Got error 140 from storage engine

I've confirmed this with two projects—one where just last week everything worked fine.

The only other reference I could find with a similar error output is: docker/for-linux#72

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions