https://github.com/nextcloud/docker/issues/1492

当我在Nextcloud更新时遇到了这个错误,解决方法,添加 –transaction-isolation=READ-COMMITTED –log-bin=ROW –innodb-read-only-compressed=OFF

在此之前我使用了macvlan来给容器分配了独立IP

完整的 docker-compose

# 开启网卡混杂模式
ip link set enp10s0 promisc on

# 创建macvlan
docker network create -d macvlan --subnet=10.10.10.0/24 --gateway=10.10.10.1 \
-o parent=enp10s0 macvlan

# dockere-compose
version: '3.1'

services:

  db:
    container_name: mariadb
    image: mariadb
    restart: always
    command: --transaction-isolation=READ-COMMITTED --log-bin=ROW --innodb-read-only-compressed=OFF
    environment:
        MYSQL_ROOT_PASSWORD: PASSWORD
        MYSQL_PASSWORD: PASSWORD
        MYSQL_DATABASE: nextcloud
        MYSQL_USER: nextcloud
    networks:
        macvlan:
            ipv4_address: 10.10.10.10
    volumes:
        - /mnt/Docker/Mariadb:/var/lib/mysql
        - /mnt/Docker/Mariadb/conf.d:/etc/mysql/conf.d

networks:
    macvlan:
        external: 
            name: macvlan

0 条评论

发表回复

Avatar placeholder

您的邮箱地址不会被公开。 必填项已用 * 标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据