Closed NaruZosa closed 1 year ago
Not sure, would be easier restoring from a backup.
Except when the past fortnight of backups face the exact same issue. Restoring from a backup means losing a fortnight of prod data.
Only once the container was restarted did the issue occur, until then it acted like nothing was wrong.
If you create a custom config file called my.cnf and map it to /etc/my.cnf within the container, that has this within it;
innodb_force_recovery=1
Would look something like
mysql:
image: yobasystems/alpine-mariadb
environment:
MYSQL_ROOT_PASSWORD:
MYSQL_DATABASE:
MYSQL_USER:
MYSQL_PASSWORD:
expose:
- "3306"
volumes:
- /data/example/mysql:/var/lib/mysql
- /data/example/my.cnf:/etc/my.cnf
restart: always
Hi there, It seems my container didn't stop gracefully, which has resulted in the following error and restart loop:
The mariadb knowledge base suggests setting innodb_force_recovery to 1, 2, 3 or 4 then starting MariaDB to attempt automatic repairs. How would I go about setting this for the docker container?