Warning: mysqli_real_connect(): (HY000/2002): Connection refused in /var/www/html/wordpress/wp-includes/wp-db.php on line 1626
first check wp-config.php for this 4 lines

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'database_name_here' );
/** MySQL database username */
define( 'DB_USER', 'username_here' );
/** MySQL database password */
define( 'DB_PASSWORD', 'password_here' );
/** MySQL hostname */
define( 'DB_HOST', 'localhost' );


then Check Your Database Host Information
and if you failed do this action
add define('WP_ALLOW_REPAIR', true); in your wp-config.php
and after you have done ,navigate with http://yourwebsite.com/wp-admin/maint/repair.php.
and better before doing disactivate all pluging via ftp
rename plugins to plugins.deactivate.
repair wordpress
and finnaly Update WordPress Site URL in wp_options tables
Update WordPress Site URL