# Unknown (generic) error from engine while initialnizing nextcloud 18

**URL:** <https://help.nextcloud.com/t/unknown-generic-error-from-engine-while-initialnizing-nextcloud-18/73630>\
**Category:** 📦 Appliances (Docker, Snappy, VM, NCP, AIO)\
**Tags:** docker, nc18\
**Created:** [March 12, 2020, 10:48am UTC](https://help.nextcloud.com/t/unknown-generic-error-from-engine-while-initialnizing-nextcloud-18/73630 "2020-03-12T10:48:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![wyxls](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wyxls/32/18676_2.png) [@wyxls](https://help.nextcloud.com/u/wyxls)\
**Post date:** [March 12, 2020, 10:48am UTC](https://help.nextcloud.com/t/unknown-generic-error-from-engine-while-initialnizing-nextcloud-18/73630/1 "2020-03-12T10:48:15Z")

</div>

```auto
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

```auto
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](https://help.nextcloud.com/t/upload-file-synchronization-performance-problem/62989)).

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:

```auto
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") 

```

---

<div class="post-metadata">

**Author:** ![wyxls](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wyxls/32/18676_2.png) [@wyxls](https://help.nextcloud.com/u/wyxls)\
**Post date:** [March 15, 2020, 5:19am UTC](https://help.nextcloud.com/t/unknown-generic-error-from-engine-while-initialnizing-nextcloud-18/73630/2 "2020-03-15T05:19:32Z")

</div>

It is really weird. After some period of time, the db-type convert succeeded. Maybe I did something like upgrading the Docker Windows to v2.2.0.4 and it fixed the problem?

---

<div class="post-metadata">

**Author:** ![builte](https://help.nextcloud.com/letter_avatar/builte/32/5_5575768a8748004e209b776fc1b2916d.png) [@builte](https://help.nextcloud.com/u/builte)\
**Post date:** [September 17, 2021, 1:53pm UTC](https://help.nextcloud.com/t/unknown-generic-error-from-engine-while-initialnizing-nextcloud-18/73630/3 "2021-09-17T13:53:30Z")

</div>

Did you do something to resolve this? I am facing the same error. But I am running on Arch Linux without docker.

---

<div class="post-metadata">

**Author:** ![wyxls](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wyxls/32/18676_2.png) [@wyxls](https://help.nextcloud.com/u/wyxls)\
**Post date:** [October 12, 2022, 6:51am UTC](https://help.nextcloud.com/t/unknown-generic-error-from-engine-while-initialnizing-nextcloud-18/73630/4 "2022-10-12T06:51:10Z")

</div>

Sorry, I didn’t know this post was followed until today one year later. But I still didn’t figure out why.

Now I already migrate the physic platform to Unraid and use the docker fuction to run nextcloud and has no problem with it. ( v24.0.6)

I guess it was some kind of file system issue with docker for windows. As the volumes of nextcloud container are mounted to external windows NTFS file system, there are many weird errors happened during reading or writing data via smb sharing ( this is how docker for windows deals with data transfer between inside container and outside windows NTFS)

Maybe this is one of the reasons why.

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 11, 2024, 9:06pm UTC](https://help.nextcloud.com/t/unknown-generic-error-from-engine-while-initialnizing-nextcloud-18/73630/5 "2024-12-11T21:06:03Z")

</div>


