Can't deploy Xibo CMS using docker - SQLSTATE[HY000] [1045] Access denied

To be completed by the original poster:

CMS Version

4.2.0

Installation Method

Docker-compose file

Operating System

Ubuntu 22.04

Issue

Hi, everyone. So basically I’ve tried to install Xibo but I didn’t succeed.

Here’s the error I’m getting:
Fatal Error - sorry this shouldn’t happen.
SQLSTATE[HY000] [1045] Access denied for user ‘cms’@‘172.18.0.6’ (using password: YES)

Here’s what I’ve tried so far (none of them has worked so far):

  • using a shorter and simple password like 3337xibodb
  • tried using a random password setting random password at docker-compose.yml file;
  • I’ve tried changing docker-compose networks to “xibo” for all containers;
  • I’ve tried setting a mysql password inside the config file and at the docker-compose.yml file;

Here’s my docker-compose.yml:
version: “2.1”

services:
cms-db:
image: mysql:8.0
networks:

  • xibo
    volumes:
  • “./shared/db:/var/lib/mysql:Z”
    environment:
  • MYSQL_DATABASE=cms
  • MYSQL_USER=cms
  • MYSQL_RANDOM_ROOT_PASSWORD=yes
    mem_limit: 1g
    env_file: config.env
    restart: always
    cms-xmr:
    image: Package xibo-xmr · GitHub
    networks:
  • xibo
    ports:
  • “9505:9505”
    restart: always
    mem_limit: 256m
    env_file: config.env
    cms-web:
    image: Package xibo-cms · GitHub
    networks:
  • xibo
    volumes:
  • “./shared/cms/custom:/var/www/cms/custom:Z”
  • “./shared/backup:/var/www/backup:Z”
  • “./shared/cms/web/theme/custom:/var/www/cms/web/theme/custom:Z”
  • “./shared/cms/library:/var/www/cms/library:Z”
  • “./shared/cms/web/userscripts:/var/www/cms/web/userscripts:Z”
  • “./shared/cms/ca-certs:/var/www/cms/ca-certs:Z”
    restart: always
    environment:
  • MYSQL_HOST=cms-db
  • XMR_HOST=cms-xmr
  • CMS_USE_MEMCACHED=true
  • MEMCACHED_HOST=cms-memcached
    env_file: config.env
    ports:
  • “80:80”
    mem_limit: 1g
    cms-memcached:
    networks:
  • xibo
    image: memcached:alpine
    command: memcached -m 15
    restart: always
    mem_limit: 100M
    cms-quickchart:
    networks:
  • xibo
    image: ianw/quickchart
    restart: always
    networks:
    xibo:

Here’s my config.env:
MYSQL_PASSWORD=3337xibo (similar, just different numbers, not the real one)

Provide screenshots where possible!

I’ve managed to install Xibo doing this:

wget https://github.com/xibosignage/xibo-cms/releases/download/4.2.0/xibo-cms-4.2.0.zipxibo-cms-4.2.0.zip
unzip xibo-cms-4.2.0.zip
cd xibo-cms-4.2.0
cp config.env.template config.env
Edit the mysql_password variable to a very simple password using 16 characters.
Mine is similar to this example: word1111word1111word
Now, do sudo docker-compose up -d or docker-compose up -d

If everything goes wrong, remove it and try again with sudo docker-compose down -v or docker-compose down -v