I have a shared hosting on hostgator with around wordpress based websites. Out of them 4 stopped working with message as error establishing database connection. On checking the wp-config i found the Db connection details were changed for all of them to
/** The name of the database for WordPress */
define('DB_NAME', 'admin_drr');
/** MySQL database username */
define('DB_USER', 'admin_drr');
/** MySQL database password */
define('DB_PASSWORD', 'sBKDb6E1aM');
/** MySQL hostname */
define('DB_HOST', '46.21.253.40');
There were changes in .htaccess file as well and I had to reset it to default. For one of the site the DB prefix was also change.
I was able to fix the issue but i was unable to understand if it part of some king of hacking or malware, Or not. Any way to find this? Or was it somthing else like due to wordpress's auto upgrade or something else.
I noticed someone else has reported similar issue as well: WP site not accessible and seems like someone hacked the wp-config.php - admin_drr database
Another reason for me to share this is to bring this is issue to others notice and hopefully someone can figure out the exact cause and fix for it.