Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

bigandy

macrumors G3
Original poster
Apr 30, 2004
8,852
7
Murka
I have here, subject a: an XServe G5 running OS X 10.3.9 Server.

The problem with it, is it was running MySQL apps (it runs an intranet website, no connection to the outside world), as root with no password. That is, root in MySQL had no password configured.

Aside from the "eep" this causes anyway, the MySQL seems to have assigned itself one when I tried to make a backup earlier, in preparation to move it to 10.4 server.

So now, none of the intranet can be accessed, as the database has become inaccessible - and I need to either (a) rid myself of the password to make the backup, or (b) reset the password.

I've found procedures for recovering the root password but the commands will not work on the XServe - specifically --skip-grant-tables - while logged in as the root on OS X, it keeps saying "permission denied" when I try to kill the mysql processes.

Any ideas how I can sort this, or what I can do? Where is the MySQL database stored - and can I access the flat files and pull out the information - if necessary..?

Thanks
 
I've been through this, but still nothing :(

It seems to ignore the --init-file when loading mysqld_safe.... :confused:
 
yay, i fixed it.

fantastic :D


if you have this problem, do this:

1. go to /var/mysql and find out what the .pid file is named. let's call it host.pid now for the sake of step two.

2. login as root, and open terminal. then run the following commands:

Code:
kill `cat /var/mysql/host.pid`
mysqld_safe --skip-grant-tables &

note the ` instead of ' - the terminal can get the cat command mixed up without them, apparently.

you can now get in to your favourite mysql programme and sort out your users and permissions!

the original functions didn't work because we weren't calling mysqld_safe - something that wasn't mentioned in other tips for this procedure. probably because they aren't talking about MacOS.

hope this helps anyone with problems!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.