Database connection settings can be set in the wp-config.php file in the root directory of the website by changing the following lines:
define('DB_NAME', 'database_name'); // Database name
define('DB_USER', 'username'); // MySQL username
define('DB_PASSWORD', 'password'); // Database password
define('DB_HOST', 'localhost'); // Host name