Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
added 449 characters in body
Source Link
DevelJoe
  • 163
  • 1
  • 7

Currently, I suppose that this is due to this ?:

If there is no database initialized when the container starts, then a default database will be created. While this is the expected behavior, this means that it will not accept incoming connections until such initialization completes. This may cause issues when using automation tools, such as docker-compose, which start several containers simultaneously.

Currently, I suppose that this is due to this ?:

If there is no database initialized when the container starts, then a default database will be created. While this is the expected behavior, this means that it will not accept incoming connections until such initialization completes. This may cause issues when using automation tools, such as docker-compose, which start several containers simultaneously.

added 487 characters in body
Source Link
DevelJoe
  • 163
  • 1
  • 7

I've been digging a little further, and I noticed that, wehn the mariadb image is built (e.g. when you first run docker-compose up with the above mentioned file contents), I get the above-mentioned error plus the output:

PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER

So it seems that, at the moment of the image being built; the MARIADB_ROOT_PASSWORD is for some reason not applied, but aftewards it is, and that that's the reason for the failed connection?

I've been digging a little further, and I noticed that, wehn the mariadb image is built (e.g. when you first run docker-compose up with the above mentioned file contents), I get the above-mentioned error plus the output:

PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER

So it seems that, at the moment of the image being built; the MARIADB_ROOT_PASSWORD is for some reason not applied, but aftewards it is, and that that's the reason for the failed connection?

added 174 characters in body
Source Link
DevelJoe
  • 163
  • 1
  • 7

I'm really confused with this, as docker-compose up and the DB connection + operations sometimesonly work on subsequent calls after failing on the first time docker-compose up fails (with the above-mentioned error). When then calling docker-compose down calls, then do docker-compose up again in the subsequent times, things all work flawlessly. Any idea why this happens?

I'm really confused with this, as docker-compose up and the DB connection + operations sometimes work on subsequent calls after docker-compose down calls.

I'm really confused with this, as docker-compose up and the DB connection only work after failing on the first time docker-compose up fails (with the above-mentioned error). When then calling docker-compose down, then do docker-compose up again in the subsequent times, things all work flawlessly. Any idea why this happens?

deleted 13 characters in body
Source Link
DevelJoe
  • 163
  • 1
  • 7
Loading
Source Link
DevelJoe
  • 163
  • 1
  • 7
Loading