• Hi.

    I’m getting the standard “Error establishing a database connection”-jazz on localhost on my new powerbook. I’ve had this many times in the past, each time with a completely different cure needed to fix it. This time the symptoms are as follows:

    First I run mysql> SELECT USER(); and get:
    +——————-+
    | USER() |
    +——————-+
    | root@localhost |
    +——————-+

    which looks ok to me, so I check that I am set up in wp-config as user ‘root’, like I am on the other servers. Yes, no problem there.

    I have earlier made a database called ‘testzone’, which shows up in CocoaMySql, but not in mysql> when entering ‘show databases;’
    I therefore deleted testzone in CocoaMySql and attempted to create it anew in mysql> using create database testzone;

    This gives me an ERROR 1044 (4200): Access denided for user ”@’localhost’ to database ‘testzone’

    Why not ‘root’@’localhost’? I investigate by running mysql> SELECT USER(); again, and this time, to my surprise, I get:
    +——————-+
    | USER() |
    +——————-+
    | th@localhost |
    +——————-+

    Ehh? Now what? Where did root go? I have earlier also tried to change password for root to correspond with an earlier password format (or something). To no avail. I couldn’t get access to do that either. Which isn’t surprising if I’m not mighty ‘root’ after all but merely a pitiful little ‘th’.

    I should also point out that I don’t actually understand any of this, I just read a lot of tutorials and come out of it with these nifty commands that sound right.

    Running mysql standard 5.0.1 for osx 10.4 (on 10.4.2 with the apache that came with it, God knows what version), which is exactly the same as on my other Mac. It all works there. Then again… I know I’m root there. Who am I here?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator James Huff

    (@macmanx)

    Try the installation again, but follow this tutorial: https://maczealots.com/tutorials/wordpress/

    Thread Starter TH

    (@th)

    That’s the way I did it. I used that very page for reference. Only difference is that when the tutorial reach this part:

    ‘/usr/local/mysql/bin/mysqladmin -u root password yourpasswordhere’

    I get an error message:
    connect to server ‘localhost’ failed
    error: ‘Access denied for user ‘root’@’localhost’ (using password: NO)’

    This was a part I was thinking of when I wrote “I have earlier also tried to change password for root….”
    When I got this error message I tried other tutorials that had different commands for doing the same thing. They said something about the password having to be changed into an older mysql version format. I think that was what it said. Had about 20 different pages open so I closed them after they each failed me.

    When I was playing with my mac.. I didnt have actual Root till i went and enabled “root” on it before that I was jsut plain old admin in GUI…

    https://docs.info.apple.com/article.html?artnum=106290

    that was just me though, you might have already done this. apologies if that was old news

    Thread Starter TH

    (@th)

    Ok. Did that. I was very optimistic when I read your answer, estjohn, since I remember setting some kind of root something on the old Mac when it was new (and dinosaurs ruled the earth).

    However… it hasn’t immediately solved anything.

    To be on the safe side, I did all the steps in macmanx’ link above. I even did the change root password bit (/usr/local/mysql/bin/mysqladmin -u root password yourpasswordhere), which gave me this error:
    error: ‘Access denied for user ‘root’@’localhost’ (using password: NO)’

    Strange symptom: When I use show databases; the database testzone is not listed. Nevertheless I just deleted it and recreated it, so I know it is there.

    Another symptom: the MySql system preference pane which wouldn’t start mysql on startup before my latest OS upgrade, now refuse to stop MySql.

    The only thing I have accomplished, is to add the user root, which screws up my comfortable autologon. I now have to manually click on my user icon and type my password whenever I start my computer.

    Thread Starter TH

    (@th)

    Ok… I installed a thing called MAMP, and about 2 minutes later every frustration I’ve ever had relateing to PHP, MySql and Apache had vanished. I don’t even need to have root enabled on this thing for it to work. https://127.0.0.1/~your_username/test.php

    since 127.0.0.1 is localhost.. only you can see it.. so its kinda hard to know what you are talking about. Plus.. I am not familliar with MAMP

    Thread Starter TH

    (@th)

    Oops. Wrong link. MAMP is here: https://www.mamp.info/en/home/

    I had the same problem. Went round and round in circles. Then it worked without a hitch in MAMP. I have 10.4.3.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Am I root or not? (OSX 10.4.2)’ is closed to new replies.