Hello! I have also encountered the same problem, I think should be the config.php file out of order. My solution is to download a new wondpress source code.
Then remove the inside of the config.php file. And the old config.php to fill the same mysql data and text encoding, and then replace the FTP upload files, the problem solved.
Want to help to you, I wish you good luck!