A couple of years back i tried to install apache, php and mysql on my mac. I got it all working but in the end i got fed up of doing everything on the command line so switched to mamp
Now I'm fed up with the sluggishness of mamp and want to get better at using the command line. I'm trying to set it up my self (well, with mac ports) but i forgot the password for the mysql root user. No big problem, no data on there I need, I'll just reinstall.
I uninstall of mysql, re-installed mysql and ran:
sudo -u _mysql mysql_install_db5 /opt/local/share/mysql5/mysql/mysql.server start
All worked fine but doing mysqladmin5 -u root -p ping
asks me for a password and mysqladmin5 -u root ping
doesn't work.
Best Answer
The problem was I didn't have a root user to reset the password of to fix do: Shell:
mysql:
shell:
mysql:
More information here: http://helpfromfriend.com/database/mysql/how-to-recreate-root-account-in-mysql/