A
A
Anton2016-11-07 20:01:40
MySQL
Anton, 2016-11-07 20:01:40

Can't start MySQL. What is the problem?

$ /etc/init.d/mysql start 
  [....] Starting mysql (via systemctl): mysql.serviceJob for mysql.service failed. See 'systemctl status mysql.service' and 'journalctl -xn' for details.
  failed!

$ systemctl status mysql.service
  ● mysql.service - LSB: Start and stop the mysql database server daemon
  Loaded: loaded (/etc/init.d/mysql)
  Active: failed (Result: exit-code) since Пн 2016-11-07 11:59:35 EST; 10s ago
  Process: 279 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)

  ноя 07 11:59:00 user_name systemd[1]: Starting LSB: Start and stop the mysq.....
  ноя 07 11:59:35 user_name mysql[279]: Starting MySQL database server: mysql...d!
  ноя 07 11:59:35 user_name systemd[1]: mysql.service: control process exited...=1
  ноя 07 11:59:35 user_name systemd[1]: Failed to start LSB: Start and stop t...n.
  ноя 07 11:59:35 user_name systemd[1]: Unit mysql.service entered failed state.
  Hint: Some lines were ellipsized, use -l to show in full.

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

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
sim3x, 2016-11-07
@hummingbird

Apparently, during installation / migration, the directory for https://dev.mysql.com/doc/refman/5.7/en/server-sys...
was not created Solution
Create such a directory and give the rights / user / group the same as the directories nearby

R
RoverWhite, 2016-11-07
@RoverWhite

You need to look at the MySQL server error log
Here is an article about this log (including)
https://habrahabr.ru/sandbox/22772/
There should be a message about the reason why the server did not start

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question