Why dosnt work my database connection? #1336
nilsapruzzese
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
i have a problem my database connection down work
in my registerConfig() is this
$this->mergeConfigFrom( module_path($this->moduleName, 'Config/database.php'), 'database.connections.core' );
in the Config/database.php this:
`<?php
return [
'driver' => 'mysql',
'url' => env( 'DATABASE_URL' ),
'host' => '',
'port' => 3306,
'database' => '',
'username' => '',
'password' => '',
'unix_socket' => env( 'DB_CORE_SOCKET', '' ),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'options' => extension_loaded( 'pdo_mysql' ) ?
array_filter( [ PDO::MYSQL_ATTR_SSL_CA => env( 'MYSQL_ATTR_SSL_CA' ), ] ) : [],
];`
when i will migrate comes SQLSTATE[HY000] [2002] Could not connect because the target computer refused to connect. (SQL: select * from information_schema.tables where table_schema = laravel and table_name = migrations and table_type = 'BASE TABLE')
Why he will the database config from root project?
Beta Was this translation helpful? Give feedback.
All reactions