Install MySQL on Mac OS X

Here is my note of installing MySQL on Mac OS X, it's pretty easy.

Environment:

  • Mac OS X Yosemite 10.10.5
  • MySQL Community Server 5.6.26

Steps

1. Download MySQL DMG file

Open this link:

Download this file (no version for 10.10, and the one for 10.9 works on 10.10):

  • Mac OS X 10.9 (x86, 64-bit), DMG Archive

Notes: you may need to create an Oracle account to download the file.

2. Installation

Open the DMF file and continue the installation.

3. Start MySQL service

You can start or stop the MySQL service on this panel:

  • System Menu -> System Preferences -> MySQL

4. Configure the command alias

In order to run the two useful commands, add the following two lines to file "~/.bash_profile":

alias mysql=/usr/local/mysql/bin/mysql
alias mysqladmin=/usr/local/mysql/bin/mysqladmin

You need to open a new console to let me take effect, or do it in your own way.

  • Posted: 2015-09-11 22:27
  • Author: konca
  • Categories: (none)

Comments

No comments.