Skip to content

Latest commit

 

History

History
66 lines (45 loc) · 2.74 KB

mysql-5.6.md

File metadata and controls

66 lines (45 loc) · 2.74 KB

MySQL 5.6

MySQL Server installation

  1. Visit http://dev.mysql.com/downloads/mysql/;
  2. Download the latest .dmg archive;
  3. Open the downloaded file and follow on-screen instructions;
  4. You will receive a prompt window with the MySQL server password - store it in a temporary location;
  5. Append the following to your ~/.bash_profile or ~/.zshrc;
export PATH=${PATH}:/usr/local/mysql/bin
MySQL Preference Pane

The MySQL preference pane enables you to start, stop, and control MySQL server within System Preferences.

To install MySQL preference pane follow the instructions here: http://dev.mysql.com/doc/refman/5.6/en/macosx-installation-prefpane.html

Please note: The latest versions of the MySQL installer install the preference pane automatically. Check if you already have the preference pane installed. Go to System Preferences and look for a MySQL icon.

  1. Go to System Preferences > MySQL;
  2. Uncheck the Automatically Start MySQL Server on Startup option.

Reset your password

Please note: This is an important step in order to be able to connect with MySQL Workbench. See this related stackoverflow question for further info.

  1. Go to System Preferences > MySQL;
  2. Make sure the MySQL server is running. If not, start the server;
  3. Run the following command in a terminal;
mysql --user root --password

Enter the server password you were given during MySQL server installation.

  1. Execute the following SQL command;
SET PASSWORD = PASSWORD('<new password/>');
  1. Enter quit to exit the MySQL CLI session;
  2. Store password in a secure location, e.g. KeePassX.

MySQL Workbench installation

MySQL Workbench is the official MySQL client. It's free, as in beer, and quite powerful.

  1. Visit http://dev.mysql.com/downloads/tools/workbench/;
  2. Download the latest .dmg archive;
  3. Open the downloaded file and follow instructions.
Setup connection within MySQL Workbench to local MySQL server
  1. Run MySQL Workbench that should already be installed in your system;
  2. Go to Database > Manage Connections... from the top menu;
  3. Hit the New button from the bottom left corner;
  4. Provide a meaningful connection name, e.g root@localhost;
  5. Press the Store in Keychain... button next to the Password label;
  6. Enter the server password you provided during password reset;
  7. Hit the Test connection button;
  8. Assuming you got a success message, hit OK and your are done.