Config.php  holds the connection data for the databases used by Concretecms. This shows the detail for three databases

 

return [
    'default-connection' => 'connection1',
    'connections' => [
        'connection1' => [
            'driver' => 'c5_pdo_mysql',
            'server' => 'localhost',
            'database' => 'database1',
            'username' => 'user1',
            'password' => 'password1',
            'character_set' => 'utf8mb4',
            'collation' => 'utf8mb4_unicode_ci',
        ], 'conection2' => [
            'driver' => 'c5_pdo_mysql',
            'server' => 'localhost',
            'database' => 'database2',
            'username' => 'user2',
            'password' => 'password2',
            'character_set' => 'utf8mb4',
            'collation' => 'utf8mb4_unicode_ci',
        ],
        'connection3' => [
            'driver' => 'c5_pdo_mysql',
            'server' => 'localhost',
            'database' => 'database3',
            'username' => 'user3',
            'password' => 'password3',
            'character_set' => 'utf8mb4',
            'collation' => 'utf8mb4_unicode_ci',
        ],
    ],
];
 

 

When using the inbuilt DB use 

$connectionName = $databaseManager->getDefaultConnection();

or 

$connection = $databaseManager->connection();

When opening a named connection use 

$connection = $databaseManager->connection('connection name');