I’ve installed full LAMP stack in my Droplet. I am not an expert but things seem to be working most of the time. But occasionally my SQL server shuts down.
When I try to run “mysql” command through bash window I got the error below. Most people say it is because of missing configuration in SQL ports. But when I restart the droplet everything returns back to normal, at least for a while until another random crash occurs.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
I’ve also checked SQL logs. There is a reoccuring pattern. The below error is logged everytime I have this problem. Can anybody give me some pointers about what it means?
2020-08-10 4:13:38 0 [Note] /usr/sbin/mysqld (initiated by: unknown): Normal shutdown 2020-08-10 4:13:38 0 [Note] Event Scheduler: Purging the queue. 0 events 2020-08-10 4:13:38 0 [Note] InnoDB: FTS optimize thread exiting. 2020-08-10 4:13:38 0 [Note] InnoDB: Starting shutdown... 2020-08-10 4:13:38 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool 2020-08-10 4:13:38 0 [Note] InnoDB: Buffer pool(s) dump completed at 200810 4:13:38 2020-08-10 4:13:40 0 [Note] InnoDB: Shutdown completed; log sequence number 231485352; transaction id 514172 2020-08-10 4:13:40 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1" 2020-08-10 4:13:40 0 [Note] /usr/sbin/mysqld: Shutdown complete
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.