Just for future reference. If you have an existing connection, rename it (conn_localhostOLD.php for example) and then make the new dynamic connection file calling it by the same name (conn_localhost.php).
That way no search and replace throughout the site is necessary.
HTH for any future mods.