i ran into same problm, the issue occurred after multiple failed attempts to login to wpadmin. my server is running on centos6.9, and my sql service is down and wont start for some reason, it gives me error
MySQL Daemon failed to start.
Starting mysqld: [FAILED]
i tried to repair the database by adding define(‘WP_ALLOW_REPAIR’, true); into wp-config.php file, but it dosent give me an option to repair the database it shows me the same Error establishing a database connection error