• As I try to access the wp-login page of my WordPress website, it shows this message:

    “Access denied for user ‘user’@’localhost’ (using password: )”

    • This topic was modified 3 months, 1 week ago by pakgondal.
    • This topic was modified 3 months, 1 week ago by James Huff. Reason: database password removed from public forums
Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator t-p

    (@t-p)

    Moderator James Huff

    (@macmanx)

    You should also change your database password as soon as you get a chance, because these are public forums, and they are indexed and cached by search engines like Google.

    Check wp-config.php file, open in your WordPress directory, and confirm this lines have correct details:
    define('DB_NAME', 'your_database_name');
    define('DB_USER', 'your_database_user');
    define('DB_PASSWORD', 'your_database_password');
    define('DB_HOST', 'localhost'); // Confirm this with your hostname or IP

    Check that the user specified in wp-config.php has access to the database and has the necessary permissions.

    Test Database Connection by creating the test-db.php file:
    <?php $link = mysqli_connect('localhost', 'your_database_user', 'your_database_password', 'your_database_name'); if (!$link) { die('Connection failed: ' . mysqli_connect_error()); } echo 'Connected successfully!'; mysqli_close($link); ?>

    Upload this and test connection, If the above steps don’t resolve the issue, contact your hosting provider for assistance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.