What are your settings relating to the database in wp-config.php?
Have you changed anything lately?
I haven’t changed anything as of recently. I checked my wp_config file and I can see that the database credentials have changed…I never touch those files.
// ** MySQL settings – You can get this info from your web host ** //
/** The name of the database for WordPress */
define(‘DB_NAME’, ‘itabpos_wrdp3’);
/** MySQL database username */
define(‘DB_USER’, ‘xxxx’);
/** MySQL database password */
define(‘DB_PASSWORD’, ‘xxxxxxxx####’);
/** MySQL hostname */
define(‘DB_HOST’, ‘107.170.38.165’);
/** Database Charset to use in creating database tables. */
define(‘DB_CHARSET’, ‘utf8mb4’);
/** The Database Collate type. Don’t change this if in doubt. */
define(‘DB_COLLATE’, ”);
I’m going to change the database to the correct one and see if that works.
I changed the database to the one on my server and now I am prompted to install WordPress…this is not good!!
`// ** MySQL settings – You can get this info from your web host ** //
/** The name of the database for WordPress */
define(‘DB_NAME’, ‘itabpos_wrdp3’);
/** MySQL database username */
define(‘DB_USER’, ‘itabpos_user’);
/** MySQL database password */
define(‘DB_PASSWORD’, ‘*******’);
/** MySQL hostname */
define(‘DB_HOST’, ‘localhost’);
/** Database Charset to use in creating database tables. */
define(‘DB_CHARSET’, ‘utf8mb4’);
/** The Database Collate type. Don’t change this if in doubt. */
define(‘DB_COLLATE’, ”);
That’s progress. It means you can connect to the DB. Now, check the $table_prefix in your wp-config.php file to make sure it matches what you see in phpmyadmin.
This is the current setting:
`
/**
* WordPress Database Table prefix.
*
* You can have multiple installations in one database if you give each
* a unique prefix. Only numbers, letters, and underscores please!
*/
$table_prefix = ‘wp’;
/**
All my mySQL database entries begin with that, I guess, such as…
wp_commentmeta
wp_comments
wp_failed_jobs
etc..
And that did the trick…thank you very much for your help.
Now my question is…who in the hell went and changed the wp_config database credentials? It was an entirely different database name, username, password, and the host was an IP address (not localhost). Someone obviously changed it…I figure my hosting is somehow compromised and a hacker got in.
Or you accidentally uploaded something, or the host broke something and restored a file too old, or…
But: Change your hosting account password immediately. If they support two factor authentication, enable that, too.
Install the WordFence plugin and scan your site for oddities.