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

fraser1980

macrumors member
Original poster
Nov 5, 2008
33
0
I attempted to set up a dev environment on my mac a couple of years ago but only got as far as getting apache set up. I made a start on setting up MySQL including setting passwords but didn't complete the process.

I have today got hold of MAMP and am trying to set up my dev environment using this. Again, Apache is working fine but with my previous tinkerings I set a root password that I cannot remember.

I came accross this post: http://blog.innovativethought.net/2007/05/17/resetting-your-forgotten-mysql-password/ which seems to be everything I need, however I have fallen at the first hurdle... When I execute /usr/local/mysql/bin/mysqld_safe --skip-grant-tables I get a permission denied error (I have tried this logged in on my user account and my admin account). Commenter richard on the above page also reports this problem but the solution in the link provided in the answer didn't seem to make any difference.

I have zero experience in terminal. It seems that I need to add my account to the sudoers file to grant myself permission to execute the above command. Could someone kindly give me a complete idiots guide to how to do this please. I have tried a number of things suggested by various forums and websites and even (I think) managed to open the sudoers file in terminal but was unsure where I had to add an entry or in what form.

Many many thanks.
 
First things first, why are you trying to execute the binary in /usr/local/mysql/ if you've installed MAMP?

MAMP is a sandbox install so you want to configure it's own version of mysql not the one you half configured previously!
 
First things first, why are you trying to execute the binary in /usr/local/mysql/ if you've installed MAMP?

MAMP is a sandbox install so you want to configure it's own version of mysql not the one you half configured previously!

Thanks for the reply...

To answer your first question..... I have no idea:confused::confused::confused:

Sounds promising. When I run MAMP, I get the green light to show me MySQL is running. I would have thought that I would connect to it with localhost and root, however, I just get prompted for a password over and over. I assumed this was because of my previous install. Should I be able to connect to the MAMP mysql server using just localhost and root? What would the default password be?

When I installed MAMP, I was not given the option to set any passwords and the only settings within MAMP relating to MySQL is the port.... do I need to specify the port when I connect ie localhost:8888?
 
The MAMP mysql install will be a new and different install to the one you did previously in /usr/local. The MAMP files are all under applications/MAMP

By default a fresh mysql install will have no password set for root hence why the mysql docs tell you to set one.

I'm sure there's plenty of docs on the MAMP site?
 
I managed to connect to the DB. Turns out the page that launches every time you start mamp that I had ignored every time has a massive section with idiot proof (even for me) settings to connect.
 
Forgot Password for MSQ in mac 10.8.2

Its a shame the solution went back to MAMP - I am in the same boat as the original poster, when trying to run

/usr/local/mysql/bin/mysqld_safe --skip-grant-tables

I get
Code:
mysqld_safe Logging to '/usr/local/mysql/data/calvins-MacBook-Air.local.err'.
 
mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data

mysqld_safe mysqld from pid file /usr/local/mysql/data/calvins-MacBook-Air.local.pid ended

I am trying to reset my root password as well falling at the first hurdle for http://innovativethought.net/2007/05/17/resetting-your-forgotten-mysql-password/

thanks for any help:confused:
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.