There are two ways to install MySQL on Mac platforms:
1) Use the official DMG installation;
2) Use homebrew mode
I recommend the use of homebrew way to install, save most of the trouble, the use of official DMG method recommended to the official website download: http://dev.mysql.com/downloads/mysql/
Use homebrew mode
Installation:
sudo brew install MySQL
Start:
sudo mysql.server start
You may encounter the following problem:
starting MySQL. ERROR! The server quit without updating PID file (/usr/local/var/mysql/joshs-macbook-pro.local.pid).
The fact is to change the file permissions:
ademacbook-pro:~ apple$ sudo chown-r mysql/usr/local/var/mysql/
ademacbook-pro:~ apple$ sudo mysql.server start
Starting MySQL
. success!
A discussion on this issue:
Http://stackoverflow.com/questions/12627604/mysql-start-up-issues-error-the-server-quit-without-updating-pid-file
Http://stackoverflow.com/questions/4963171/mysql-server-startup-error-the-server-quit-without-updating-pid-file
http://segmentfault.com/a/1190000000438233
Log in and use as follows:
ademacbook-pro:~ apple$ Mysql-uroot-Penter Password:welcome to the MySQL Monitor. Commands End With; or \g.your MySQL connection ID is 1Server Version:5.6. atHomebrewcopyright (c) -, the, Oracle and/or its affiliates. All rights reserved. Oracle isA registered trademark of Oracle Corporation and/or Itsaffiliates. Other names trademarks of their respectiveowners. Type'Help ;'Or'\h' forHelp. Type'\c'To clear the current input statement.mysql>
MySQL installation (Mac platform)