You can change the database connection information inside the file system/data/autoconfig.php.
system/data/autoconfig.php
Simply open the file in a text editor and make the appropriate changes.