Support » Fixing WordPress » mySQL problem (local machine – mac os X)

  • This is less a wordpress question and more a mySQL question — but, everyone here has had the best answers to any of my questions so I thought I would post it (and, I can’t use my wordpress on my local machine until I get it fixed!).

    The setup: Mac OS X.4.4; mysql 4.something, php, apache, all installed and working fine for some time. Today, I added the bbpress install as well as a drupal install. Now I am having some problems. I will outline the problem, what I have tried to do to fix it, and what I think caused it. Hope you can help and I am sorry this is long.

    The problem: I can’t login to mysql anymore with the “root” username (which is where I have all my database files and tables stored for a couple wordpress installs, the bbpress, and now the drupal). When I execute in terminal:

    /usr/local/mysql/bin/mysql -u root -p

    And then enter my password, I get the following error:

    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

    Attempted solutions: I assumed the password was changed somehow; I wanted to reset the password for “root”. I searched the internet, and most suggest that I (in summary): kill the mysqld process, then either find a .pid file for my server and do something with it (but I can’t get in the directory that houses the file) -or- enter mysqld --skip-grant-tables --user=root after I’ve killed the mysqld command again.

    In both instances, I am getting permission errors and I can accomplish neither.

    I believe the .pid I need to chanage is housed in my /usr/local/mysql/data folder, however, I can’t get access to the folder. The permissions are set to have “mysql” be the owner (drwxrwx---).

    I am not a unix wiz, have tried to chmod my way out of it, but no luck.

    Why I am being punished: I think this all might have started when I was setting up the database for drupal, I think I did something to cause a password change (I ran one set of commands without re-typing “user” over the template).

    I guess I just need a little hand holding.

    Thank you!


Viewing 5 replies - 1 through 5 (of 5 total)
  • Have you seen this: ? All the Mac wizards are referring to this tutorial for installing WP on their machine.

    Yea, I have that bookmarked. I used that resource intially a few months ago when I got it all up and running.

    Now though, everything is installed, I just need to figure out how to reset the root password to see if still have my databases intact … I just don’t know enough about unix to accomplish it at present. It is possible that there is another problem, but I believe it to be the password (that makes most sense to me).

    Try this to reset your password. I had a few troubles with with the password and that fixed it (though once i had to frag the whole MySQL install and start from scratch….)..

    Thanks; tried all that. I am still getting “access denied” errors … For example:

    ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql'

    Pretty much all I try I get access errors. Any way to reset the access privileges ?

    And, out of curiousity, is the mysqld process supposed to run under the “root” or under the “mysql” user ?

    For those curious, I found a solution (of a sort) to my problem. You can read about it here.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘mySQL problem (local machine – mac os X)’ is closed to new replies.