Install Python setuptools:
$ curl -s https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py | sudo python
Install Python pip:
$ curl -s https://raw.github.com/pypa/pip/master/contrib/get-pip.py | sudo python
Installing MySQL database server on a Mac with OSX Mountain Lion is relatively easy, if you follow these steps:
1. Download MySQL
Best option is to directly download a .dmg image file directly from mysql.com. The MySQL Downloads page has a list of all the different versions available. In my case, I chose MySQL 5.6.11 (latest one available) MySQL 5.6.11 on DMG format for OSX 10.7 x86 64bit.
Extract and install.
2. Configure the server
Without going into configuration details and database tunning, the main two things are setting up a password for the root user and creating a database to use. Additionally, you may want to create a separate user for your app(s).
First we might need to create aliases for the MySQL binaries:
$ sudo ln -s "/usr/local/mysql-5.6.11-osx10.7-x86_64/bin/mysqladmin" /usr/bin/mysqladmin
$ sudo ln -s "/usr/local/mysql-5.6.11-osx10.7-x86_64/bin/mysql" /usr/bin/mysql
Then we can proceed with the configuration:
$ mysqladmin -u root password 'rootpassword'
$ mysql -u root -prootpassword -e "create database database_name character set utf8 collate utf8_general_ci;"
$ mysql -u root -prootpassword -e "grant all privileges on database_name.* to username@localhost identified by 'userpassword';"
Note: Using the password on the command line like above can be insecure.
3. Install your favorite MySQL client (optional)
In my case, I really like Sequel Pro. Let’s install it and connect to our new local MySQL server via socket.
That is it!
If you are a big fan of Submile Text 2, check out this guide: http://drewbarontini.com/setup/sublime-text/
The recently (2010) proposed PATH HTTP method seems to be ready for production.
Any one using it?