Take a look to the wp-config.php file and locate the following codes.
/** The name of the database for WordPress */
define( 'DB_NAME', 'YOUR_DATABASE_NAME');
/** MySQL database username */
define( 'DB_USER', 'YOUR_DATABASE_USERNAME');
/** MySQL database password */
define( 'DB_PASSWORD', 'YOUR_DATABASE_PASSWORD');
/** MySQL hostname */
define( 'DB_HOST', 'localhost');
Make sure that you have added the correct database information.
YOUR_DATABASE_NAME - Replace with your database name
YOUR_DATABASE_USERNAME - Replace with your database username
YOUR_DATABASE_PASSWORD - Replace with your database password