I made a copy of one of my drupal sites and I'm attempting to set it up to use a different database but for some reason it's ignoring changes to my settings.php file. My settings.php file is in sites/default/settings.php and contains the following
$databases['default']['default'] = array ( 'database' => 'my_db_database', 'username' => 'my_db_user', 'password' => 'my_db_password', 'host' => 'my_db_host', 'port' => '3306', 'driver' => 'mysql', 'prefix' => '', 'collation' => 'utf8mb4_general_ci', );
However the changes I made to it don't seem to take. It's still using the old database. As a test I even put in incorrect information and tried commenting everything out to see if I can break it, but there was no effect. I also checked to make sure there was no local.settings.php file.
Is there something that needs to be done to reload the settings.php file. If not is there a way to see what settings.php file is being used in case there's another file overriding it?
UPDATE: Turns out the issue was a dummy mistake on my part. The domain was pointing to the wrong server. However I'm not closing this question because I believe these answers could be helpful to others in similar situations.