YPCrumble
YPCrumble

Reputation: 28662

How to change mysql root password

I'm trying to change the mysql root password on my machine. Another engineer created the password and left the company so I don't have access. I'd rather not have to reinstall the whole shebang.

I'm trying to follow the instructions here: http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html

But when I execute the command on step 2 of the "Resetting the Root Password: Unix Systems" instructions I get the following error:

FitValet-MacBook-Pro:~ fitvalet$ kill `cat /usr/local/mysql/data/FitValet-MacBook-Pro.local.pid`
cat: /usr/local/mysql/data/FitValet-MacBook-Pro.local.pid: Permission denied
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]

And I can't figure it out for the life of me...permission is denied? How can I get past this? Thanks!

Upvotes: 1

Views: 980

Answers (1)

Asaph
Asaph

Reputation: 162771

Try adding sudo in front of the kill and cat commands. Like this:

sudo kill `sudo cat /usr/local/mysql/data/FitValet-MacBook-Pro.local.pid`

It will then ask you for the root password for your Mac (not mysql). Enter it, and the command should execute without giving you a permission denied error.

Upvotes: 1

Related Questions