I followed the guide but still can’t get my external db to work consistently. It seems after some time period, the db gets corrupted and tries to write way outside of it’s allotted space with the following error:
[ERROR] InnoDB: Trying to access page number 72613888 in space 4294967294, space name mysql, which is outside the tablespace bounds. Byte offset 0, len 16384, i/o type read. If you get this error at mysqld startup, please check that your my.cnf matches the ibdata files that you have in the MySQL server.
CONFIG:
recorder:
purge_interval: 50
purge_keep_days: 180
db_url: mysql://hass:[email protected]:8124/hass?charset=utf8
DOCKER COMPOSE:
homeassistant:
image: homeassistant/home-assistant
container_name: homeassistant
restart: always
network_mode: host
depends_on:
- homeassistant_mysql
- mosquitto
volumes:
- ./appdata/home-assistant:/config
devices:
- "/dev/ttyACM0:/zwaveusbstick:rwm"
ports:
- "${IP_ADDRESS}:8123:8123"
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
homeassistant_mysql:
image: mysql:latest
container_name: homeassistant_mysql
restart: always
network_mode: host
volumes:
- ./appdata/home-assistant_mysql:/var/lib/mysql
- /etc/timezone:/etc/timezone:ro
ports:
- "${IP_ADDRESS}:8124:3306"
environment:
MYSQL_ROOT_PASSWORD: "test"
MYSQL_DATABASE: "hass"
MYSQL_USER: "hass"
MYSQL_PASSWORD: "test"
TZ: ${TZ}