Welcome to part 2 of the MAMP tutorial. In this part we will go over setting up Mysql on your Mac’s localhost. Part 1 goes over everything you need to do to setup PHP on a Mac
What green means: any lines that you need to replace in this tutorial will be in green.
You need to download and install Mysql on your mac.
1. Go to the MySQL site, scroll down the page and look for version Mac OS X ver. 10.6 (x86, 64-bit), DMG Archive. Click the blue download button.
This will take you to a page that asks you to login or signup. You don’t have to signup, instead there is a link right below these buttons. Click the link “No thanks, just start my download.” This will start the download.
2. After downloaded you will need to install all 3 of the components in the package.
Double-click on each package to install them.
mysql-5.6.10-osx10.6-x86_64.pkg – MySQL software
MySQL.prefPane – Allows mysql to stop/start
MYSQLStartupItem.pkg – Allows mysql to start when booted
To start MySQL via the command line
sudo /usr/local/mysql/support-files/mysql.server start
Or you can click Start MySQL Server when the dialog opens after installing the 2nd package.
Set MySQL root password:
/usr/local/mysql/bin/mysqladmin -u root password 'yourpassword'
That’s it. You have MySQL installed and running on your localhost.
In part 3 I will be going over setting up phpMyAdmin