Laradock: MariaDB connection documentation

Created on 18 Aug 2017  路  3Comments  路  Source: laradock/laradock

Info:

  • Docker version: 17.06.0-ce, build 02c1d87:
  • Laradock commit: 38fb49bccc5124dfa26b92b809ea6efbd6307eba:
  • System info: Mac
  • System info disto/version: 10.12.6

Issue:

I am running: docker-compose up -d nginx mariadb

I had issues when launching docker with nginx and mariadb. The documentation and walk throughs that I was able to find for this configuration indicated that the DB_HOST value within the laravel environment should be set to mysql as it is a stand. This resulted in a SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known.

While investigating this error I found several closed posts that resulted in updates to the configuration in docker file but as they were all addressed it didn't appear to match my issue.

Through trial and error I was able to connect to it by using.
DB_HOST=mariadb
in my laravel project .env file

My question would be: should we provide additional information regarding the connection settings in the laradock/.env file or in the documentation for the configuration of each database?

Even if it were commented out I think it could save a lot of time for people starting out with laradock.


Expected behavior:

Documentation updates

MARIADB

MARIADB_DB_HOST=mariadb
MARIADB_DATABASE=default
MARIADB_USER=default
MARIADB_PASSWORD=secret
MARIADB_PORT=3306
MARIADB_ROOT_PASSWORD=root
MARIADB_ENTRYPOINT_INITDB=./mariadb/docker-entrypoint-initdb.d


Reproduce:


Relevant Code:

// place a code sample here
Stale

All 3 comments

The only way to find out this information was to spend 2 hours googling and finally finding this open issue... so yeah, would be gladly appreciated.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Hi again 馃憢 we would like to inform you that this issue has been automatically closed 馃敀 because it had not recent activity during the stale period. We really really appreciate your contributions, and looking forward for more in the future 馃巿.

Was this page helpful?
0 / 5 - 0 ratings