You have to:
1. Edit wp-config.php file, to update your new connection info for
host: usually it's "localhost"
db: your new db name
user: db username
pass: db password
2. If you domain have changed, then you have to use a find and replace tool like
http://interconnectit.com/products/search-and-replace-for-wordpress-databases/
change the URL.