One day on a production server crashed mysql
phpmyadmin gives error 2002
access to the system via ssh.
Conclusions are such
ps -ea |grep mysql
1090 ? 00:00:00 mysqld_safe
1477 ? 11:50:43 mysqld
/etc/init.d/mysqld stop
bash: /etc/init.d/mysqld: No such file or directory
systemctl start mysqld.service
Failed to issue method call: Unit mysqld.service failed to load: No such file or directory. See system logs and 'systemctl status mysqld.service' for details.
systemctl status mysqld.service
mysqld.service
Loaded: error (Reason: No such file or directory)
Active: inactive (dead)
systemctl status mysql.service
mysql.service - LSB: Start the MySQL database server
Loaded: loaded (/etc/init.d/mysql)
Active: failed (Result: timeout) since Wed, 29 Jun 2016 16:20:55 +0400; 5min ago
Process: 29500 ExecStop=/etc/init.d/mysql stop (code=killed, signal=TERM)
Process: 10422 ExecStart=/etc/init.d/mysql start (code=killed, signal=TERM)
CGroup: name=systemd:/system/mysql.service
When you write
/etc/init.d/mysql start
redirecting to systemctl
and if hangs.
Google didn't help(