Did anyone face already that error, when creating a MariaDB with docker-compose in IntelliJ ?
I simply created a docker-compose.yml and added the lines below. After running the compose file and trying to open the DB with clicking on the Port, this error in the logs appear.
version: '3'
services:
database:
image: mariadb:10.9.4
restart: always
environment:
MARIADB_DATABASE: 'uebung'
MARIADB_USER: 'user'
MARIADB_PASSWORD: 'password'
MARIADB_ROOT_PASSWORD: 'root'
ports:
- '3306:3306'
volumes:
- data:/var/lib/mariadb
- ./initdb:/docker-entrypoint-initdb.d-
volumes:
data:
2023-03-10 13:40:23 2023-03-10 12:40:23+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.11.2+maria~ubu2204 started.
2023-03-10 13:40:23 2023-03-10 12:40:23+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2023-03-10 13:40:23 2023-03-10 12:40:23+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.11.2+maria~ubu2204 started.
2023-03-10 13:40:24 2023-03-10 12:40:24+00:00 [Note] [Entrypoint]: MariaDB upgrade not required
2023-03-10 13:40:24 2023-03-10 12:40:24 0 [Note] Starting MariaDB 10.11.2-MariaDB-1:10.11.2+maria~ubu2204 source revision cafba8761af55ae16cc69c9b53a341340a845b36 as process 1
2023-03-10 13:40:24 2023-03-10 12:40:24 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2023-03-10 13:40:24 2023-03-10 12:40:24 0 [Note] InnoDB: Number of transaction pools: 1
2023-03-10 13:40:24 2023-03-10 12:40:24 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2023-03-10 13:40:24 2023-03-10 12:40:24 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
2023-03-10 13:40:24 2023-03-10 12:40:24 0 [Note] InnoDB: Using liburing
2023-03-10 13:40:24 2023-03-10 12:40:24 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
2023-03-10 13:40:24 2023-03-10 12:40:24 0 [Note] InnoDB: Completed initialization of buffer pool
2023-03-10 13:40:24 2023-03-10 12:40:24 0 [Note] InnoDB: File system buffers for log disabled (block size=4096 bytes)
2023-03-10 13:40:24 2023-03-10 12:40:24 0 [Note] InnoDB: 128 rollback segments are active.
2023-03-10 13:40:24 2023-03-10 12:40:24 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
2023-03-10 13:40:24 2023-03-10 12:40:24 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
2023-03-10 13:40:24 2023-03-10 12:40:24 0 [Note] InnoDB: log sequence number 46902; transaction id 14
2023-03-10 13:40:24 2023-03-10 12:40:24 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2023-03-10 13:40:24 2023-03-10 12:40:24 0 [Note] Plugin 'FEEDBACK' is disabled.
2023-03-10 13:40:24 2023-03-10 12:40:24 0 [Warning] You need to use --log-bin to make --expire-logs-days or --binlog-expire-logs-seconds work.
2023-03-10 13:40:24 2023-03-10 12:40:24 0 [Note] InnoDB: Buffer pool(s) load completed at 230310 12:40:24
2023-03-10 13:40:24 2023-03-10 12:40:24 0 [Note] Server socket created on IP: '0.0.0.0'.
2023-03-10 13:40:24 2023-03-10 12:40:24 0 [Note] Server socket created on IP: '::'.
2023-03-10 13:40:24 2023-03-10 12:40:24 0 [Note] mariadbd: ready for connections.
2023-03-10 13:40:24 Version: '10.11.2-MariaDB-1:10.11.2+maria~ubu2204' socket: '/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution
2023-03-10 13:40:37 2023-03-10 12:40:37 3 [Warning] Aborted connection 3 to db: 'unconnected' user: 'unauthenticated' host: '172.21.0.1' (This connection closed normally without authentication)
I tried already deleting the images/container, also started docker again. Deleted the cache of docker and also tried a different port..
I also found similar error in stack overflow which couldn't solve my problem. Would be great if anyone has an idea what's the error here.
OS: macOS Catalina Version 10.15.7 Docker: Docker Desktop 4.14.1 (91661)
Connection setup in IntelliJ
I think I solved my problem. I connect the database like MSpiller mentioned, then I was able to connect the db but I didn't know that MariaDB doesn't allow to press just on the port as I was used from mysql which forwarded me to MyPhPAdmin to configure the database. Now I added the following code to my docker-compose to create a MyPhpAdmin Container to be able to enter the configuration Page at 'https://localhost:8080'
version: '3'
services:
database:
image: mariadb:10.9.4
restart: always
environment:
MARIADB_DATABASE: 'uebung'
MARIADB_USER: 'user'
MARIADB_PASSWORD: 'password'
MARIADB_ROOT_PASSWORD: 'root'
ports:
- '3306:3306'
volumes:
- data:/var/lib/mariadb
- ./initdb:/docker-entrypoint-initdb.d
phpmyadmin:
image: phpmyadmin/phpmyadmin
restart: always
environment:
PMA_HOST: database
PMA_PORT: 3306
PMA_ARBITRARY: 1
ports:
- '8080:80'
depends_on:
- database
volumes:
data:
Thanks :) Thread can be closed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With