Solution: 1
Check your wp-config.php file to ensure the database details are correct. It should look something like this:
// ** MySQL settings - You can get this info from your web host ** //
// Database name
define('DB_NAME', 'wp');
// MySQL database username
define('DB_USER', 'root');
// MySQL database password
define('DB_PASSWORD', '');
// MySQL hostname
define('DB_HOST', 'localhost');
Make sure the values (DB_NAME, DB_USER, DB_PASSWORD, DB_HOST) match your actual database credentials.