invoiceninja / dockerfiles

Docker files for Invoice Ninja
https://hub.docker.com/r/invoiceninja/invoiceninja
GNU General Public License v2.0
419 stars 268 forks source link

Clean checkout leads to MySQL connection error #407

Closed psistorm closed 3 years ago

psistorm commented 3 years ago
  1. Clean checkout
  2. Adjust APP_KEY
  3. docker-compose up -d
  4. app container consistently restarts with the following error message:
2021-11-04T10:55:30Z [ERROR] [Entrypoint]: Error connecting to DB
2021-11-04T10:55:31Z [INFO] [Entrypoint]: Initialising Invoice Ninja...
Configuration cache cleared!
Configuration cached successfully!
Configuration cache cleared!
Configuration cached successfully!
Route cache cleared!
Routes cached successfully!
Files cached successfully!

In Connection.php line 703:

  SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_s
  chema.tables where table_schema = ninja and table_name = accounts and table
  _type = 'BASE TABLE')

In Connector.php line 70:

  SQLSTATE[HY000] [2002] Connection refused
turbo124 commented 3 years ago

did you chown 1500?

psistorm commented 3 years ago

Well I thought I did, but seems like I forgot to hit enter a second time after copying those instructions...so thanks that was the problem and as most of the time the problem sat in front of the screen... 😄

Strit commented 2 years ago

I have this issue and I did do the chown command on all the public/storage/database folders that gets mounted in the docker-compose file.

What am I missing?

navanjr commented 1 year ago

did you chown 1500?

which folders are you referring to?