The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Only the root MySQL user can access the database (4 posts)

  1. Jo Sprague
    Posted 3 years ago #

    I am trying to set up WordPress locally. I had it setup and working before, but I decided I wanted to start fresh, so I wiped everything on my localhost and tried to install everything again. The problem is, when I am trying to configure WordPress to use any MySQL user other than 'root', I get the "Error establishing a database connection" message. I'm pretty sure the MySQL user is set up correctly, and with the right permissions, and I've triple checked what I'm putting into the wp-config file (the only thing I'm changing is the username and password). I know I could just use 'root' since it's local, but I want to set this up the same on my localhost as on the live server.

  2. Karun
    Posted 3 years ago #

    After you create a new user in database and new database , you need to set permission to the user to all the privileges of the database. Have you done this?

  3. rhewitt
    Posted 3 years ago #

    I'm having the same problem. I created a database, and a user within that database with all privileges. I filled out a wp-config.php with all of my credentials, but I get the same message, "Error establishing a database connection."

    If I change the username to root and leave the password blank (on a WAMP stack) I am able to log-in to the back-end.

    Why can I log-in using root, but not the database user that I created according to the WP install guide?

  4. Brandon Wanamaker
    Posted 3 years ago #

    You'll need to be sure that the user has all the privileges you set on the database you want to use.

    WAMP and MAMP both have phpMyAdmin, so it's easy to log in, go to the database you want to use and check that the user you created has permission to use that database.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.