The process to install MySQL on Mac OS X is a pretty straight forward process. MySQL is one of the most popular open source databases. It is used in a wide variety of applications.
Download MySQL Installer
First you will need to download the DMG archive from http://dev.mysql.com/downloads/mysql/ Install MySQL from the downloaded DMG archive as you would normally a typical application.
For maximum compatibility you should create a symbolic link to where MySQL places the socket. This will help other applications that assume where the socket is located. In the terminal:
sudo su - cd /var mkdir mysql cd mysql ln -s /tmp/mysql.sock mysql.sock
To make it easier to run MySQL commands from the terminal, you will should update your bash profile. This assumes that your .bash_profile does not exist. If it does, you should probably manually edit the file and add the appropriate part below. In the terminal:
echo 'export PATH="/usr/local/mysql/bin:$PATH"' >> ~/.bash_profile
Start MySQL Server
Start MySQL server from the new MySQL icon in your system preferences. After starting the MySQL server you will want to complete your configuration by running the secure installation script from the terminal by issuing the mysql_secure_installation command. When prompted you should set a password and accept the default of Yes for all other options.
Take MySQL Further
To learn more about MySQL I suggest you pick up a copy of High Performance MySQL: Optimization, Backups, and Replication. Optionally you may want to install a visual MySQL client so you don’t have to do everything in the terminal. I would recommend installing the Sequel Pro client for Mac OS X. I hope this guide has given you enough enough information to install MySQL on Mac OS X. It is a really simple process.