Created
February 17, 2014 05:25
-
-
Save midhunkrishna/9045188 to your computer and use it in GitHub Desktop.
A gist to configure mysql on mac machine for Rails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install mysql #install mysql using home brew | |
mysql_install_db --verbose --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp | |
mkdir -p ~/Library/LaunchAgents | |
cp /usr/local/Cellar/mysql/<mysql dist version you have>/<the plist file you have in this dir>.plist ~/Library/LaunchAgents/ | |
launchctl load -w ~/Library/LaunchAgents/<the plist file you have in this dir>.plist | |
#try | |
mysql -uroot; #if it works: yayyyy !!! | |
#Resetting mysql root password | |
$ mysql -u root | |
mysql> use mysql; | |
mysql> update user set password=PASSWORD("NEWPASSWORD") where User='root'; | |
mysql> flush privileges; | |
mysql> quit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment