How to find relevant config files? (Error: SQLSTATE[HY000] [2002])

Hello!
During automatic project deployment simple bash script runs yii migration process:
php yii migrate --interactive=0 --migrationPath=./vendor/yiisoft/yii2/rbac/migrations;
that ends with

Error: SQLSTATE[HY000] [2002] No such file or directory
Yii Migration Tool (based on Yii v2.0.51)

Could you please help me to find relevant config files in order to correct this error?
It is no any config/db.php file in the project directory. Yii code seems to located at the
/vendor/yiisoft/yii2.
The similar migration process in the older version project works fine.

I’m sorry that I completely new in the Yii framework. All the settings were made by a person with whom I can’t contact now.

There are *yii executable " Yii console bootstrap file" in the root project dir.
Сould it contain a hint where to look for configuration files?

db.php is common to and included in console.php and web.php respectively.
Example db.php:

<?php

return [
    'class' => 'yii\db\Connection',
    'dsn' => 'mysql:host=localhost;dbname=yii2basic',
    'username' => '',
    'password' => '',
    'charset' => 'utf8',
];

Do you run the new version in the same environment as the one that works?
If not:
I don’t know, but I googled the error message and the problem may be related to pdo_mysql.default_socket in php.ini (cli version in this case)

1 Like

Thanks for your reply, Tri!
I found connection parameters by content seach for “mysql:host=”
I have no idea why, but they are located in ./common/config/main-local.php
instead of config/db.php

Problem solved, great thanks again!