docker-dolibarr
docker-dolibarr copied to clipboard
Waiting that SQL database is up ...
I'm trying to deploy Dolibarr through a Portainer Stack on my Synology NAS by following this guide.
I keep getting this error "Waiting that SQL database is up ..." on my Dolibar container while the MariaDB container seems to work just fine.
Here is what my Portainer stack looks like:
version: "3"
services:
mariadb:
image: mariadb:latest
container_name: Dolibarr-DB
environment:
MYSQL_ROOT_PASSWORD: dolibarr
MYSQL_DATABASE: dolibarr
volumes:
- /volume1/docker/dolidb:/var/lib/mysql:rw
web:
image: tuxgasy/dolibarr:latest
container_name: Dolibarr
environment:
DOLI_DB_HOST: mariadb
DOLI_DB_USER: dolibarr
DOLI_DB_PASSWORD: doli
DOLI_DB_NAME: dolibarr
PHP_INI_DATE_TIMEZONE: Europe/Lisbon
DOLI_ADMIN_LOGIN: dolibarr
DOLI_ADMIN_PASSWORD: doli
ports:
- 8041:80
links:
- mariadb
Here how my container looks like in Portainer:
Does anyone know why my Dolibarr container can't connect to MariaDB? Perhaps if you have a similar setup could you share your stack?
Hello,
Can you use Dolibarr-DB in variable DOLI_DB_HOST ?
---
version: '3.7'
services:
dolibarr:
image: tuxgasy/dolibarr:16
restart: always
depends_on:
- db
volumes:
- /volume1/docker/dolidoc:/var/www/documents
- /volume1/docker/doliscripts:/var/www/scripts
- /volume1/docker/dolicustom:/var/www/custom
networks:
- db
environment:
DOLI_DB_TYPE: mysqli
DOLI_DB_HOST: db
DOLI_DB_PORT: 3306
DOLI_DB_NAME: dolibarr_db
DOLI_DB_USER: dolibarr_usr1
DOLI_DB_PASSWORD: BestMDPFOREVER
DOLI_URL_ROOT: https://dolibarr.mltech.fr
db:
image: mysql:8
command: --default-authentication-plugin=mysql_native_password --character-set-server=utf8 --collation-server=utf8_general_ci
restart: always
environment:
MYSQL_ROOT_PASSWORD: MdPToRootUSER
MYSQL_DATABASE: dolibarr_db
MYSQL_USER: dolibarr_usr1
MYSQL_PASSWORD: BestMDPFOREVER
volumes:
- /volume1/docker/dolidb:/var/lib/mysql
networks:
- db
# Docker Networks
networks:
db:
Hello, I have the same issue with MySQL instead of MariaDB.
I login in my container and I tried to connect to the database from 1 Dolibarr container to MySQL container.
I got this error:
ERROR 1045 (28000): Plugin caching_sha2_password could not be loaded: /usr/lib/x86_64-linux-gnu/mariadb19/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory
We must use "mysql_native_password" authentication plugin instead of "caching_sha2_password" because the last is not supported.
The workaround for MySQL container is to add the following line in the "docker-compose.yml" file in the "DB" section.
command: --default-authentication-plugin=mysql_native_password
I think an upgrade is required.