Apart from the check that you have to do with your WordPress Database Credentials, also you can check and repair your database
Navigate to your root WordPress file directory and find the wp-config
. This file contains your WordPress installation settings and configuration. You can add this line of code of the bottom :
define( 'WP_ALLOW_REPAIR', true );
This line will enable you from one hand to optimize and on the other hand to repair your database by navigating to www.yourwebsite.com/wp-admin/maint/repair.php
(you can replace the “yourwebsite.com” with your actual URL). Then will see a screen with two options repair database and repair and optimize your database. Feel free and choose your option, but the option of repair and optimize will take longer.
In the end, please keep in mind that the database repair page is not secure because anyone can access that URL without having to login. Once you have done with this process and you are done repairing your database, then be sure to remove the line of code you added to wp-config, I refer to define( 'WP_ALLOW_REPAIR', true );