LycheeOrg / Lychee-Docker

Docker image for Lychee
https://lycheeorg.github.io/
166 stars 56 forks source link

SQL-ERROR SQLSTATE[HY000] [2002] Connection refused #25

Closed daantrommel closed 4 years ago

daantrommel commented 4 years ago

I try to setup Lychee-Laravel but keep getting the following error in the docker log when starting:

Migrate the database

In Connection.php line 664:

SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_s
chema.tables where table_schema = lychee and table_name = migrations)

In PDOConnection.php line 31:

SQLSTATE[HY000] [2002] Connection refused

In PDOConnection.php line 27:

SQLSTATE[HY000] [2002] Connection refused

Create user and use PUID/PGID -e User UID : 1000 -e User GID : 1000 Set Permissions Setup complete, starting the server.

Docker-compose is as follows: lychee_db: container_name: lychee_db image: mysql:8.0 command: --default-authentication-plugin=mysql_native_password environment:

lychee: image: bigrob8181/lychee-laravel container_name: lychee_laravel ports:

daantrommel commented 4 years ago

I figured it out, even though I used port 3309 on my host I still had to set DB_PORT to 3306.