These instructions are based on Mac OS X, although the steps should be easily transferable to another operating system.

Install MySQL

  1. Download MySQL Community Server of MySQL Community Edition, version 5.6 or later.
  2. Complete all installation instructions, including the postinstallation setup and testing sections.
  3. MySQL gets installed to /usr/local/mysql-VERSION and also installs a symbolic link, /usr/local/mysql, that points to the new location.  By default, MySQL is set up with only a root account with no password.

Update the PATH Environment Variable

To ensure that the MySQL bin folder has been added to your PATH environment variable, do the following:

  1. In a plain text editor such as TextEdit, navigate to your home folder (~ or /Users/<yourname>).
  2. From the File menu, choose Open.
  3. Press Cmd + Shift + . so that hidden files are shown, and select the .profile file.

  4. Add the line shown to the right and save the file.

  5. Note that the Path change will not be reflected in any open Terminal window. You will need to close and reopen it for the Path change to take effect.

Line to add to the .profile file:

export PATH=$PATH:/usr/local/mysql/bin