I have a laravel web site and I need to connect to the mysql db on the hosting. My settings in the config are:
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'test'),
'username' => env('DB_USERNAME', 'test'),
'password' => env('DB_PASSWORD', 'test'),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => true,
'engine' => null,
],
When I create new db on the hosting I get database like this: id111111_test and the same user and password. As I see I have replace all test with id111111_test in my config. Do I need replace 127.0.0.1 with localhost? And how to config port and driver? Thanks.