It has been few weeks that MySQL shuts downs "by himself", and I'm not able to identify why. Maybe one of you could help me. Here is the error logs. They're always the same. MySQL seem to be shutting down by a command because there is no error !
2021-09-13T21:34:06.756258Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2021-09-13T21:34:06.756338Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2021-09-13T21:34:06.757289Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.35-0ubuntu0.18.04.1-log) starting as process 1871 ...
2021-09-13T21:34:06.804334Z 0 [Note] InnoDB: PUNCH HOLE support available
2021-09-13T21:34:06.804363Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2021-09-13T21:34:06.804368Z 0 [Note] InnoDB: Uses event mutexes
2021-09-13T21:34:06.804372Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2021-09-13T21:34:06.804377Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-09-13T21:34:06.804381Z 0 [Note] InnoDB: Using Linux native AIO
2021-09-13T21:34:06.822301Z 0 [Note] InnoDB: Number of pools: 1
2021-09-13T21:34:06.839476Z 0 [Note] InnoDB: Using CPU crc32 instructions
2021-09-13T21:34:06.897060Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2021-09-13T21:34:07.094636Z 0 [Note] InnoDB: Completed initialization of buffer pool
2021-09-13T21:34:07.100892Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2021-09-13T21:34:07.285705Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2021-09-13T21:34:09.894630Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2021-09-13T21:34:09.954738Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2021-09-13T21:34:10.735927Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2021-09-13T21:34:10.736676Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2021-09-13T21:34:10.736688Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2021-09-13T21:34:10.737084Z 0 [Note] InnoDB: Waiting for purge to start
2021-09-13T21:34:10.787228Z 0 [Note] InnoDB: 5.7.35 started; log sequence number 61448754798
2021-09-13T21:34:10.787374Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2021-09-13T21:34:10.787491Z 0 [Note] Plugin 'FEDERATED' is disabled.
2021-09-13T21:34:11.501547Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
2021-09-13T21:34:11.501568Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
2021-09-13T21:34:11.501573Z 0 [Warning] A deprecated TLS version TLSv1 is enabled. Please use TLSv1.2 or higher.
2021-09-13T21:34:11.501576Z 0 [Warning] A deprecated TLS version TLSv1.1 is enabled. Please use TLSv1.2 or higher.
2021-09-13T21:34:11.846383Z 0 [Warning] CA certificate ca.pem is self signed.
2021-09-13T21:34:11.846426Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
2021-09-13T21:34:11.846484Z 0 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
2021-09-13T21:34:11.846494Z 0 [Note] - '127.0.0.1' resolves to '127.0.0.1';
2021-09-13T21:34:11.846516Z 0 [Note] Server socket created on IP: '127.0.0.1'.
2021-09-13T21:34:13.280763Z 0 [Note] InnoDB: Buffer pool(s) load completed at 210914 1:34:13
2021-09-13T21:34:13.920227Z 0 [Note] Event Scheduler: Loaded 0 events
2021-09-13T21:34:13.928843Z 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.7.35-0ubuntu0.18.04.1-log' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
2021-09-13T21:36:16.087598Z 5 [Note] Access denied for user ''@'localhost' (using password: NO)
2021-09-13T21:36:16.087914Z 6 [Note] Access denied for user ''@'localhost' (using password: NO)
2021-09-13T21:38:16.964716Z 11 [Note] Access denied for user ''@'localhost' (using password: NO)
2021-09-13T21:38:16.965082Z 12 [Note] Access denied for user ''@'localhost' (using password: NO)
2021-09-13T21:40:17.643999Z 16 [Note] Access denied for user ''@'localhost' (using password: NO)
2021-09-13T21:40:17.644339Z 17 [Note] Access denied for user ''@'localhost' (using password: NO)
2021-09-13T21:42:18.323266Z 18 [Note] Access denied for user ''@'localhost' (using password: NO)
2021-09-13T21:42:18.323560Z 19 [Note] Access denied for user ''@'localhost' (using password: NO)
2021-09-13T21:44:19.047584Z 24 [Note] Access denied for user ''@'localhost' (using password: NO)
2021-09-13T21:44:19.047948Z 25 [Note] Access denied for user ''@'localhost' (using password: NO)
2021-09-13T21:46:19.545298Z 28 [Note] Access denied for user ''@'localhost' (using password: NO)
2021-09-13T21:46:19.545720Z 29 [Note] Access denied for user ''@'localhost' (using password: NO)
2021-09-13T21:48:19.802815Z 30 [Note] Access denied for user ''@'localhost' (using password: NO)
2021-09-13T21:48:19.803111Z 31 [Note] Access denied for user ''@'localhost' (using password: NO)
2021-09-13T21:50:20.117097Z 35 [Note] Access denied for user ''@'localhost' (using password: NO)
2021-09-13T21:50:20.117373Z 36 [Note] Access denied for user ''@'localhost' (using password: NO)
2021-09-13T21:52:20.364602Z 37 [Note] Access denied for user ''@'localhost' (using password: NO)
2021-09-13T21:52:20.364952Z 38 [Note] Access denied for user ''@'localhost' (using password: NO)
2021-09-13T21:54:20.616118Z 43 [Note] Access denied for user ''@'localhost' (using password: NO)
2021-09-13T21:54:20.616554Z 44 [Note] Access denied for user ''@'localhost' (using password: NO)
2021-09-13T21:56:20.868258Z 61 [Note] Access denied for user ''@'localhost' (using password: NO)
2021-09-13T21:56:20.868635Z 62 [Note] Access denied for user ''@'localhost' (using password: NO)
2021-09-13T21:58:21.124084Z 73 [Note] Access denied for user ''@'localhost' (using password: NO)
2021-09-13T21:58:21.124484Z 74 [Note] Access denied for user ''@'localhost' (using password: NO)
2021-09-13T22:00:13.076413Z 0 [Note] Giving 0 client threads a chance to die gracefully
2021-09-13T22:00:13.076448Z 0 [Note] Shutting down slave threads
2021-09-13T22:00:13.076458Z 0 [Note] Forcefully disconnecting 0 remaining clients
2021-09-13T22:00:13.076466Z 0 [Note] Event Scheduler: Purging the queue. 0 events
2021-09-13T22:00:13.076515Z 0 [Note] Binlog end
2021-09-13T22:00:13.078552Z 0 [Note] Shutting down plugin 'auth_socket'
2021-09-13T22:00:13.078594Z 0 [Note] Shutting down plugin 'ngram'
2021-09-13T22:00:13.078618Z 0 [Note] Shutting down plugin 'partition'
2021-09-13T22:00:13.078624Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2021-09-13T22:00:13.078629Z 0 [Note] Shutting down plugin 'ARCHIVE'
2021-09-13T22:00:13.078633Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2021-09-13T22:00:13.078677Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
2021-09-13T22:00:13.078683Z 0 [Note] Shutting down plugin 'MyISAM'
2021-09-13T22:00:13.078692Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
2021-09-13T22:00:13.078697Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2021-09-13T22:00:13.078702Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2021-09-13T22:00:13.078706Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2021-09-13T22:00:13.078711Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2021-09-13T22:00:13.078716Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2021-09-13T22:00:13.078720Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2021-09-13T22:00:13.078724Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2021-09-13T22:00:13.078728Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2021-09-13T22:00:13.078732Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2021-09-13T22:00:13.078736Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2021-09-13T22:00:13.078741Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2021-09-13T22:00:13.078745Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2021-09-13T22:00:13.078749Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2021-09-13T22:00:13.078753Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2021-09-13T22:00:13.078757Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2021-09-13T22:00:13.078762Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
2021-09-13T22:00:13.078766Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
2021-09-13T22:00:13.078770Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2021-09-13T22:00:13.078774Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2021-09-13T22:00:13.078778Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2021-09-13T22:00:13.078782Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2021-09-13T22:00:13.078786Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2021-09-13T22:00:13.078790Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2021-09-13T22:00:13.078794Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
2021-09-13T22:00:13.078798Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2021-09-13T22:00:13.078802Z 0 [Note] Shutting down plugin 'INNODB_CMP'
2021-09-13T22:00:13.078807Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2021-09-13T22:00:13.078811Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
2021-09-13T22:00:13.078815Z 0 [Note] Shutting down plugin 'INNODB_TRX'
2021-09-13T22:00:13.078820Z 0 [Note] Shutting down plugin 'InnoDB'
2021-09-13T22:00:13.078888Z 0 [Note] InnoDB: FTS optimize thread exiting.
2021-09-13T22:00:13.081719Z 0 [Note] InnoDB: Starting shutdown...
2021-09-13T22:00:13.183912Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2021-09-13T22:00:13.184152Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 210914 2:00:13
2021-09-13T22:00:14.877431Z 0 [Note] InnoDB: Shutdown completed; log sequence number 61449084271
2021-09-13T22:00:14.879916Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2021-09-13T22:00:14.879937Z 0 [Note] Shutting down plugin 'MEMORY'
2021-09-13T22:00:14.879946Z 0 [Note] Shutting down plugin 'CSV'
2021-09-13T22:00:14.879955Z 0 [Note] Shutting down plugin 'sha256_password'
2021-09-13T22:00:14.879961Z 0 [Note] Shutting down plugin 'mysql_native_password'
2021-09-13T22:00:14.880214Z 0 [Note] Shutting down plugin 'binlog'
2021-09-13T22:00:14.947113Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
So I started printing general logs, and what I have few minutes before the crash is this :
2021-09-13T22:00:08.021336Z 91 Connect root@localhost on using Socket
2021-09-13T22:00:08.021437Z 91 Query /*!40100 SET @@SQL_MODE='' */
2021-09-13T22:00:08.021519Z 91 Query /*!40103 SET TIME_ZONE='+00:00' */
2021-09-13T22:00:08.021646Z 91 Query SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ
2021-09-13T22:00:08.021716Z 91 Query START TRANSACTION /*!40100 WITH CONSISTENT SNAPSHOT */
2021-09-13T22:00:08.021816Z 91 Query SHOW VARIABLES LIKE 'gtid\_mode'
2021-09-13T22:00:08.024477Z 91 Query UNLOCK TABLES
2021-09-13T22:00:08.024607Z 91 Query SELECT LOGFILE_GROUP_NAME, FILE_NAME, TOTAL_EXTENTS, INITIAL_SIZE, ENGINE, EXTRA FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE = 'UNDO LOG' AND FILE_NAME IS NOT NULL AND LOGFILE_GROUP_NAME IS NOT NULL AND LOGFILE_GROUP_NAME IN (SELECT DISTINCT LOGFILE_GROUP_NAME FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE = 'DATAFILE' AND TABLESPACE_NAME IN (SELECT DISTINCT TABLESPACE_NAME FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_SCHEMA IN ('alfi'))) GROUP BY LOGFILE_GROUP_NAME, FILE_NAME, ENGINE, TOTAL_EXTENTS, INITIAL_SIZE ORDER BY LOGFILE_GROUP_NAME
2021-09-13T22:00:08.032360Z 91 Query SELECT DISTINCT TABLESPACE_NAME, FILE_NAME, LOGFILE_GROUP_NAME, EXTENT_SIZE, INITIAL_SIZE, ENGINE FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE = 'DATAFILE' AND TABLESPACE_NAME IN (SELECT DISTINCT TABLESPACE_NAME FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_SCHEMA IN ('alfi')) ORDER BY TABLESPACE_NAME, LOGFILE_GROUP_NAME
2021-09-13T22:00:08.034721Z 91 Query SHOW VARIABLES LIKE 'ndbinfo\_version'
2021-09-13T22:00:08.036068Z 91 Init DB alfi
2021-09-13T22:00:08.036114Z 91 Query SAVEPOINT sp
2021-09-13T22:00:08.036163Z 91 Query show tables
2021-09-13T22:00:08.036274Z 91 Query RELEASE SAVEPOINT sp
2021-09-13T22:00:08.036333Z 91 Query show events
2021-09-13T22:00:08.036639Z 91 Query use `alfi`
2021-09-13T22:00:08.036688Z 91 Query select @@collation_database
2021-09-13T22:00:08.036742Z 91 Query SET SESSION character_set_results = 'binary'
2021-09-13T22:00:08.036798Z 91 Query SHOW FUNCTION STATUS WHERE Db = 'alfi'
2021-09-13T22:00:08.072500Z 91 Query SHOW PROCEDURE STATUS WHERE Db = 'alfi'
2021-09-13T22:00:08.073465Z 91 Query SET SESSION character_set_results = 'utf8'
2021-09-13T22:00:08.073586Z 91 Quit
2021-09-13T22:00:12.216184Z 92 Connect root@localhost on mysql using Socket
2021-09-13T22:00:12.216491Z 92 Query show databases
2021-09-13T22:00:12.217048Z 92 Quit
2021-09-13T22:00:12.630207Z 93 Connect root@localhost on mysql using Socket
2021-09-13T22:00:12.630444Z 93 Query select user.user,user.password from user,db where db.user = user.user and (db.db = 'api-bazmanzer' or db.db = 'api-bazmanzer')
2021-09-13T22:00:12.630924Z 93 Quit
2021-09-13T22:00:12.631587Z 94 Connect root@localhost on mysql using Socket
2021-09-13T22:00:12.631843Z 94 Query select user.user,user.authentication_string from user,db where db.user = user.user and (db.db = 'api-bazmanzer' or db.db = 'api-bazmanzer')
2021-09-13T22:00:12.632387Z 94 Quit
2021-09-13T22:00:12.727298Z 95 Connect root@localhost on mysql using Socket
2021-09-13T22:00:12.727479Z 95 Query select user.user,user.password from user,db where db.user = user.user and (db.db = 'api-bazmanzer' or db.db = 'api-bazmanzer')
2021-09-13T22:00:12.727787Z 95 Quit
2021-09-13T22:00:12.728262Z 96 Connect root@localhost on mysql using Socket
2021-09-13T22:00:12.728394Z 96 Query select user.user,user.authentication_string from user,db where db.user = user.user and (db.db = 'api-bazmanzer' or db.db = 'api-bazmanzer')
2021-09-13T22:00:12.728628Z 96 Quit
2021-09-13T22:00:12.732715Z 97 Connect root@localhost on mysql using Socket
2021-09-13T22:00:12.732914Z 97 Query select user.user,user.password from user,db where db.user = user.user and (db.db = 'api-bazmanzer' or db.db = 'api-bazmanzer')
2021-09-13T22:00:12.733236Z 97 Quit
2021-09-13T22:00:12.733950Z 98 Connect root@localhost on mysql using Socket
2021-09-13T22:00:12.734053Z 98 Query select user.user,user.authentication_string from user,db where db.user = user.user and (db.db = 'api-bazmanzer' or db.db = 'api-bazmanzer')
2021-09-13T22:00:12.734254Z 98 Quit
/usr/sbin/mysqld, Version: 5.7.35-0ubuntu0.18.04.1-log ((Ubuntu)). started with:
But as you can see, anything is about a shutting down command. I am out of ideas, could someone help me?