0

ubuntu mysql 5.7 /var/run/mysqld/mysqld.sock?

mysql start
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

use systemctl status mysql.service

● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: activating (start-post) (Result: exit-code) since 一 2018-12-10 11:45:31 CST; 13s ago
Process: 7442 ExecStart=/usr/sbin/mysqld (code=exited, status=2)
Process: 7434 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 7442 (code=exited, status=2);         : 7443 (mysql-systemd-s)
CGroup: /system.slice/mysql.service
       └─control
         ├─7443 /bin/bash /usr/share/mysql/mysql-systemd-start post
         └─7488 sleep 1

12月 10 11:45:31 user-70DGA014CN systemd[1]: Starting MySQL Community Server...

use journalctl -xe enter image description here

xin.chen
  • 964
  • 2
  • 8
  • 24
  • Possible duplicate of [error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' -- Missing /var/run/mysqld/mysqld.sock](https://stackoverflow.com/questions/11990708/error-cant-connect-to-local-mysql-server-through-socket-var-run-mysqld-mysq) – Pardeep Dhingra Dec 10 '18 at 03:58

1 Answers1

0

The log (red lines) said: your disk(/dev/sda) is broken. MySQL can not read the data in your disk, so it can not run. Maybe the data in the broken disk have been lost already.

Please replace the broken disks as soon as possible and recover your data from a backup.

shawn
  • 4,305
  • 1
  • 17
  • 25