Support » Fixing WordPress » Can’t Select Database

  • Please help, my entire website is down!

    “Can’t select database
    We were able to connect to the database server (which means your username and password is okay) but not able to select the JUPTP4EW34 database.

    Are you sure it exists?
    Does the user ttttttest have permission to use the JUPTP4EW34 database?
    On some systems the name of your database is prefixed with your username, so it would be like username_JUPTP4EW34. Could that be the problem?
    If you don’t know how to set up a database you should contact your host. If all else fails you may find help at the WordPress Support Forums.”

    I have no idea what to do…I am at a loss right now. That database name I do not recognize nor does it match the database name on myphpadmin. I don’t know if it’s a plugin or what that’s causing this…

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator Steve Stern

    (@sterndata)

    Support Team Volunteer

    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.

    • This reply was modified 1 year, 2 months ago by Steve Stern.

    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’, ”);

    Moderator Steve Stern

    (@sterndata)

    Support Team Volunteer

    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..

    Moderator Steve Stern

    (@sterndata)

    Support Team Volunteer

    The prefix should be wp_

    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.

    Moderator Steve Stern

    (@sterndata)

    Support Team Volunteer

    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.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Can’t Select Database’ is closed to new replies.