Hi,
I’ve tried installation of NC in docker, but base configuration does not work for me. After creating docker containers and start up, NC can’t connect to mysql container.
I see error SQLSTATE[HY000] [2002] Connection refused , or SQLSTATE[HY000] [2006] MySQL server has gone away.
Here is base config from github page, and filled only mysql passwords:
docker compose:
version: '2'
volumes:
nextcloud:
db:
services:
db:
image: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
restart: always
volumes:
- db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=root_pwd
- MYSQL_PASSWORD=password
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
app:
image: nextcloud
ports:
- 8080:80
links:
- db
volumes:
- nextcloud:/var/www/html
restart: always
I’ve tried localhost or 127.0.0.1 as mysql host in configuration wizard, but none of them works.
db container logs:
2020-03-18 13:06:13+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.4.12+maria~bionic started.
2020-03-18 13:06:15+00:00 [Note] [Entrypoint]: Switching to dedicated user ‘mysql’
2020-03-18 13:06:15+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.4.12+maria~bionic started.
2020-03-18 13:06:16 0 [Note] mysqld (mysqld 10.4.12-MariaDB-1:10.4.12+maria~bionic) starting as process 1 …
2020-03-18 13:06:16 0 [Warning] You need to use --log-bin to make --binlog-format work.
2020-03-18 13:06:16 0 [Note] InnoDB: Using Linux native AIO
2020-03-18 13:06:16 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-03-18 13:06:16 0 [Note] InnoDB: Uses event mutexes
2020-03-18 13:06:16 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-03-18 13:06:16 0 [Note] InnoDB: Number of pools: 1
2020-03-18 13:06:16 0 [Note] InnoDB: Using SSE2 crc32 instructions
2020-03-18 13:06:16 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
2020-03-18 13:06:16 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
2020-03-18 13:06:16 0 [Note] InnoDB: Completed initialization of buffer pool
2020-03-18 13:06:16 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2020-03-18 13:06:16 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=61365
2020-03-18 13:06:17 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-03-18 13:06:17 0 [Note] InnoDB: Removed temporary tablespace data file: “ibtmp1”
2020-03-18 13:06:17 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-03-18 13:06:17 0 [Note] InnoDB: Setting file ‘./ibtmp1’ size to 12 MB. Physically writing the file full; Please wait …
2020-03-18 13:06:17 0 [Note] InnoDB: File ‘./ibtmp1’ size is now 12 MB.
2020-03-18 13:06:17 0 [Note] InnoDB: Waiting for purge to start
2020-03-18 13:06:17 0 [Note] InnoDB: 10.4.12 started; log sequence number 61374; transaction id 21
2020-03-18 13:06:17 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2020-03-18 13:06:17 0 [Note] Plugin ‘FEEDBACK’ is disabled.
2020-03-18 13:06:17 0 [Note] InnoDB: Buffer pool(s) load completed at 200318 13:06:17
2020-03-18 13:06:17 0 [Note] Server socket created on IP: ‘::’.
2020-03-18 13:06:17 0 [Warning] ‘user’ entry ‘root@6464a5b3ed7b’ ignored in --skip-name-resolve mode.
2020-03-18 13:06:17 0 [Warning] ‘user’ entry ‘@6464a5b3ed7b’ ignored in --skip-name-resolve mode.
2020-03-18 13:06:17 0 [Warning] ‘proxies_priv’ entry ‘@% root@6464a5b3ed7b’ ignored in --skip-name-resolve mode.
2020-03-18 13:06:17 0 [Note] Reading of all Master_info entries succeeded
2020-03-18 13:06:17 0 [Note] Added new Master_info ‘’ to hash table
2020-03-18 13:06:17 0 [Note] mysqld: ready for connections.
Version: ‘10.4.12-MariaDB-1:10.4.12+maria~bionic’ socket: ‘/var/run/mysqld/mysqld.sock’ port: 3306 mariadb.org binary distribution
2020-03-18 13:12:10 8 [Warning] Aborted connection 8 to db: ‘unconnected’ user: ‘unauthenticated’ host: ‘172.25.0.3’ (This connection closed normally without authentication)
2020-03-18 13:12:44 9 [Warning] Aborted connection 9 to db: ‘unconnected’ user: ‘unauthenticated’ host: ‘172.25.0.3’ (This connection closed normally without authentication)
2020-03-18 13:17:54 10 [Warning] Aborted connection 10 to db: ‘unconnected’ user: ‘unauthenticated’ host: ‘172.25.0.3’ (This connection closed normally without authentication)
Any help ? Thanks.