OS system: Windows server 2019 Datecenter (v1809, 17763.805)
Docker: Docker for windows 2.2.0.3 (Engine: 19.03.5, Compose: 1.25.4)
Mariadb: Docker (mariadb:latest)
Nextcloud: 18.0.1 (nextcloud:latest)
My compose.yml
version: '3'
services:
redis:
image: redis
container_name: nextcloud-redis
restart: unless-stopped
networks:
- default
expose:
- '6379'
nextcloud:
image: nextcloud
container_name: nextcloud
restart: unless-stopped
depends_on:
- redis
volumes:
- /D/Docker/nextcloud/data:/var/www/html/data
expose:
- '80'
networks:
- default
mariadb:
image: mariadb:latest
container_name: mariadb
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --innodb-flush-method=fsync
environment:
- MYSQL_ROOT_PASSWORD=rootpassword # Requested, set the root's password of MySQL service.
- MYSQL_LOG_CONSOLE=true
volumes:
- /C/Docker/mariadb:/var/lib/mysql # Requested, specifies the path to MySQL data persistent store.
- /C/Docker/mariadb-conf/my.cnf:/etc/my.cnf
restart: unless-stopped
networks:
- default
networks:
default:
external:
name: shared
I tried deploying nextcloud 18 with MySQL for windows 8 Community Server and all things work except for some performance problems (Posted before).
Later now, I realized running database in windows is terrible. Something wrong happen while containers access database passthrough “container -> Docker Host -> sharing file system in Windows Docker -> MySQL for Windows”
So I convert it to recommended MariaDB and put it back into docker. But I stuck in the very beginning of initializing NextCloud via web interface. It turns out like the following: " An exception occurred while executing ‘ALTER TABLE oc_admin_settings CHANGE id
id BIGINT AUTO_INCREMENT NOT NULL’ " and blahblahblah.
Entering NextCloud by using SQLite and it runs well. As the same, the errors appear while I try to convert db-type to MySQL
The logs:
root@c2ddfe0dab0f:/var/www/html# php occ db:convert-type --password password --all-apps mysql nextcloud mariadb nextcloud
Creating schema in new database
In AbstractMySQLDriver.php line 106:
An exception occurred while executing 'ALTER TABLE oc_admin_settings CHANGE `id` id BIGINT AUTO_INCREMENT NOT NULL':
SQLSTATE[HY000]: General error: 1025 Error on rename of './nextcloud/oc_admin_settings' to './nextcloud/#sql2-1-56f' (errno: 168 "Unknown (generic) error from engine")
In PDOConnection.php line 90:
SQLSTATE[HY000]: General error: 1025 Error on rename of './nextcloud/oc_admin_settings' to './nextcloud/#sql2-1-56f' (errno: 168 "Unknown (generic) error from engine")
In PDOConnection.php line 88:
SQLSTATE[HY000]: General error: 1025 Error on rename of './nextcloud/oc_admin_settings' to './nextcloud/#sql2-1-56f' (errno: 168 "Unknown (generic) error from engine")