Check the config.php file (and, for more comment, the config-dist.php file) in the root of your Moodle installation. Near the top there are settings that point to the database and provide the username and password. If you migrate your database that *should* be all you need to change.
PS. Please change your profile to be your real name - we like to know who we are talking to. Everybody around here is 'moodle admin'