472,096 Members | 1,342 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,096 software developers and data experts.

how do I reset user "root" password ?

My setup: Mac OS 10.4.4; mysql 4.x ... everything was installed and
working fine for some time. Today, I added drupal to my system and had
to create a new database in mysql -- 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

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

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

I am not a unix wiz, have tried to chmod my way out of it, but no luck.
No matter what I try, I seem to be running into a permissions issue --
how can I reset permissions ?

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!

Feb 13 '06 #1
0 1922

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Speck | last post: by
2 posts views Thread by Gnarlodious | last post: by
1 post views Thread by Adam Smith | last post: by
1 post views Thread by Andrea | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.