Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL Error on Docker #1671

Open
Niemand112233 opened this issue Jun 27, 2024 · 4 comments
Open

SQL Error on Docker #1671

Niemand112233 opened this issue Jun 27, 2024 · 4 comments
Assignees
Labels

Comments

@Niemand112233
Copy link

Hi,

when using the docker image I get this error on the webpage:

SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for admidio-mariadb failed: Name or service not known

@schast
Copy link
Member

schast commented Jun 27, 2024

The hostname of Mariadb Container must equal to the hostname of ADMIDIO_DB_HOST like described in the README-Docker.md. And both Container must in the same Docker Network.

docker run --detach -it --name "Admidio-MariaDB" \
  --hostname "admidio-mariadb" \
  -p 3306:3306 \
  --restart="unless-stopped" \
  -v "Admidio-MariaDB-confd:/etc/mysql/conf.d" \
  -v "Admidio-MariaDB-data:/var/lib/mysql" \
  -e MYSQL_DATABASE="admidio" \
  -e MYSQL_ROOT_PASSWORD="my_VerySecureRootPassword.01" \
  -e MYSQL_USER="admidio" \
  -e MYSQL_PASSWORD="my_VerySecureAdmidioUserPassword.01" \
  mariadb:latest
docker run --detach -it --name "Admidio" \
  -p 8080:8080 \
  --restart="unless-stopped" \
  -v "Admidio-files:/opt/app-root/src/adm_my_files" \
  -v "Admidio-themes:/opt/app-root/src/adm_themes" \
  -v "Admidio-plugins:/opt/app-root/src/adm_plugins" \
  -e ADMIDIO_DB_HOST="admidio-mariadb:3306" \
  -e ADMIDIO_DB_NAME="admidio" \
  -e ADMIDIO_DB_USER="admidio" \
  -e ADMIDIO_DB_PASSWORD="my_VerySecureAdmidioUserPassword.01" \
  -e ADMIDIO_ROOT_PATH="https://www.mydomain.at/admidio" \
  admidio/admidio:latest

Can you post your Admidio Docker Config?

@Fasse
Copy link
Member

Fasse commented Oct 1, 2024

@Niemand112233 Is this issue still open?

@IKyriazis
Copy link

i had this same problem, I didn't realize I had to add both docker containers to the same network. I executed the following command to create the network:
docker network create admidio-network

and I added the following flag to both of the container execution commands:
--network admidio-network

@Fasse
Copy link
Member

Fasse commented Oct 31, 2024

@schast Maybe that should be described more prominent in the docker md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants