Help me with this error please!

I have wordpress running on a docker stack in portainer and when I access the wordpress page I get the error: Error establishing a database connection. I want to mention that I have an ARM structure VM in Oracle cloud, on this machine I have nextcloud also which I turned off before trying to access wordpress, maybe something is interfering, I really don’t know.

Obviously I changed the password and the database name to protect my data, but I have them set up correctly.

This is my wordpress configuration:

version: ‘2.1’

services:

wordpress:
image: wordpress
restart: always
ports:
– 8181:80

environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: horia
WORDPRESS_DB_PASSWORD: my password
WORDPRESS_DB_NAME: the name of my database
volumes:
– /mnt/wordpress/wordpress:/var/www/html
links:
– db:db

db:
image: lscr.io/linuxserver/mariadb
restart: always
environment:
MYSQL_DATABASE: name of the database
MYSQL_USER: horia
MYSQL_PASSWORD: my password
MYSQL_RANDOM_ROOT_PASSWORD: ‘1’
volumes:
– /mnt/wordpress/db:/config

volumes:
wordpress:
db:

These are my logs from the 2 containers running in the stack of the wordpress:

https://preview.redd.it/t4g6vafbcm4d1.png?width=668&format=png&auto=webp&s=cda45ed10438094b7827be4dcf974daaec2f3b6b

https://preview.redd.it/ild9javbcm4d1.png?width=1509&format=png&auto=webp&s=c8c24dc9cc52400a837577623aee309047eb9435

1 Comment
  1. You might have more luck asking in a Docker-related sub (since this isn’t a WordPress issue).

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer