Support » Installing WordPress » Local Install Error

  • Resolved the_bork

    (@the_bork)


    I installed (on a Mac) PHP, MsySQL, and phpMyAdmin. I created accounts and a database, verified usernames, passwords, version numbers, state etc (from Terminal). I downloaded WP to Web Server root. The install prompt appears. I enter the (verified) requested details…
    and a connection error is returned;
    “Error establishing a database connection”

    There might be a simple explanation for this but I can’t think of one.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter the_bork

    (@the_bork)

    Fixed. WP only allowed ‘root’ for install. (Why?) I’ll leave it here in the event that it might save someone time. Or in the event that someone has an explanation why an installation can’t proceed with a verified user (with full db privileges).

    Moderator Steve Stern (sterndata)

    (@sterndata)

    Forum Moderator & Support Team Volunteer

    If you added no other users to your MySQL server, then “root” is the only one available to you. The correct process is to create a database and user for each wordpress install in the server… Something like

    mysql -u root -p
       create database wp1;
       grant all on wp1.* to 'newuser'@'localhost' identified by 'newuserpassword';
       exit;

    Then when you do the WP install and it gets to the database part, you’d use ‘wp1’ as the database, ‘newuser’ as the user with password ‘newuserpassword’.

    Thread Starter the_bork

    (@the_bork)

    As I said, I created “users”; root and one other. I used phpMyAdmin to create the second user, password, and privileges (all). I verified the user and access to mySQL from the command line, and phpMyAdmin login.

    WP wouldn’t complete the install with the second user, only root. ?

    Moderator Steve Stern (sterndata)

    (@sterndata)

    Forum Moderator & Support Team Volunteer

    No idea except that you probably did not create the database users with the right permission grants or entered the wrong combo in the WP install settings.

    Thread Starter the_bork

    (@the_bork)

    You would think. But I did this enough times to ensure that I wasn’t entering info incorrectly. The only difference in the login details was the username and password. And as I said I used those details to log into mySQL from the terminal command line, and issued a USE command to access the db.
    I’m moving on. If it happens to someone else, the answer is “Use root”.

    Moderator Steve Stern (sterndata)

    (@sterndata)

    Forum Moderator & Support Team Volunteer

    localhost is always funky.

    Thread Starter the_bork

    (@the_bork)

    very. 🙂

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