-
Notifications
You must be signed in to change notification settings - Fork 51
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
Database Exception, SQLSTATE[HY000] [2002] Connection refused #17
Comments
Sorry, but for a bug report this is really too little information. So I will close this as it very much indicates a permission problem with you mysql container. That's not at all related to our app template here. |
I had the same error of Connection Refused, it was not a Permission problem but a problem with MySql version: for some reasons MySql 8.0 refused to connect, when changing to mysql:5.7 (in docker-compose.yml on main folder) everything just worked fine |
Hmm, is there anything to fix here? That's a general Yii / Mysql 8 issue - nothing specific to this image. |
Well, maybe momentarily force MySql to version 5.7 in docker-compose-example.yml like this: |
Makes sens. I've added a |
'db' => [ 'class' => 'yii\db\Connection', 'dsn' => self::env('DB_DSN', 'mysql:host=127.0.0.1:3306;dbname=sarmad'), 'username' => self::env('DB_USER', 'root'), 'password' => self::env('DB_PASSWORD', ''), 'charset' => 'utf8', 'tablePrefix' => '', ],
The text was updated successfully, but these errors were encountered: