mailcow-dockerized-docs/docs/troubleshooting/debug-mysql_aria.en.md

79 Zeilen
1,5 KiB
Markdown

## MariaDB: Aria recovery after crash
If your server crashed and MariaDB logs an error similar to `[ERROR] mysqld: Aria recovery failed. Please run aria_chk -r on all Aria tables (*.MAI) and delete all aria_log.######## files` you may want to try the following to recover the database to a healthy state:
2023-01-13 18:16:08 +01:00
Start the stack and wait until mysql-mailcow begins to report a restart. Check this with the following command:
2023-01-13 18:16:08 +01:00
=== "docker compose (Plugin)"
2023-01-13 18:16:08 +01:00
``` bash
docker compose ps
```
=== "docker-compose (Standalone)"
``` bash
docker-compose ps
```
Now exec the following commands:
Stop the stack, don't run "down"
=== "docker compose (Plugin)"
``` bash
docker compose stop
```
=== "docker-compose (Standalone)"
``` bash
docker-compose stop
```
Run a bash in the stopped container as user mysql
=== "docker compose (Plugin)"
``` bash
docker compose run --rm --entrypoint '/bin/sh -c "gosu mysql bash"' mysql-mailcow
```
=== "docker-compose (Standalone)"
``` bash
docker-compose run --rm --entrypoint '/bin/sh -c "gosu mysql bash"' mysql-mailcow
```
cd to the SQL data directory
```bash
cd /var/lib/mysql
2023-01-13 18:16:08 +01:00
```
Run aria_chk
```bash
aria_chk --check --force */*.MAI
2023-01-13 18:16:08 +01:00
```
Delete aria log files
```bash
rm aria_log.*
```
2023-01-13 18:16:08 +01:00
Execute a complete stack restart using the following commands:
=== "docker compose (Plugin)"
``` bash
docker compose down
docker compose up -d
```
=== "docker-compose (Standalone)"
``` bash
docker-compose down
docker-compose up -d
```