When I run my Jhipster application in docker with a MySQL database, the data will be deleted after some time.
Looking at the MySQL logs, I can see that the MySQL database recieves a SHUTDOWN command from the root user, then goes through an initialization phase.
[System] [MY-013172] [Server] Received SHUTDOWN from user root. Shutting down mysqld (Version: 8.0.29).
[System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.29) MySQL Community Server - GPL.
[Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.29-1.el8 started.
[Note] [Entrypoint]: Switching to dedicated user 'mysql'
[Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.29-1.el8 started.
'/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
[Warning] [MY-011068] [Server] The syntax '--ssl=off' is deprecated and will be removed in a future release. Please use --tls-version=invalid instead.
[System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.29) starting as process 1
[System] [MY-013576] [InnoDB] InnoDB initialization has started.
[System] [MY-013577] [InnoDB] InnoDB initialization has ended.
[Warning] [MY-011302] [Server] Plugin mysqlx reported: 'Failed at SSL configuration: "SSL context is not usable without certificate and private key"'
[System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
[System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.29' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.
When it comes back online, my JHipster app doesn't have any application data saved to the database even though I have made a docker volume for MySQL and have it attached. This includes entity data and user data, so I am unable to login.
Restarting the JHipster app will give a clean install of the database connected to the application, but doing this everytime I notice MySQL has failed is not a good long-term solution.
I'm not sure if this is an error from MySQL crashing or if JHipster is somehow clearing the database with liquibase. Any help would be appreciated.