app/etc/env.php is the database configuration file for magento2
'db' =>
array (
'table_prefix' => '',
'connection' =>
array (
'default' =>
array (
'host' => 'localhost',
'dbname' => 'database_name',
'username' => 'database_username',
'password' => 'database_password',
'active' => '1',
),
),
),