Skip to content

Instantly share code, notes, and snippets.

@timriley
Created August 29, 2009 07:41
Show Gist options
  • Save timriley/177424 to your computer and use it in GitHub Desktop.
Save timriley/177424 to your computer and use it in GitHub Desktop.
sudo port install ruby
sudo port install rb-rubygems
sudo port install mysql5-server
sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist
sudo -u mysql mysql_install_db5
/opt/local/lib/mysql5/bin/mysqladmin -u root password 'new-password'
/opt/local/lib/mysql5/bin/mysqladmin -u root -h yomi.local password 'new-password'
cd /opt/local/bin && sudo ln -s mysql5 mysql
mysql -u root -p mysql
select Host,User,Password from User;
update User set password=PASSWORD('password-here') where User='root';
delete from User where User='';
CREATE USER 'tim'@'localhost';
GRANT ALL PRIVILEGES ON *.* TO 'tim'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
sudo gem install mysql -- --with-mysql-include=/opt/local/include/mysql5 --with-mysql-lib=/opt/local/lib/mysql5 --with-mysql-config=/opt/local/lib/mysql5/bin/mysql_config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment