How to Install MySQL and MySQL Workbench on macOS

KolaKachi
This entry is part 4 of 19 in the series SQL Course For Absolute Beginners

MySQL is one of the most popular open-source relational database management systems, and MySQL Workbench is a powerful visual tool that helps you design, develop, and manage your MySQL databases. If you’re a macOS user looking to set up MySQL and MySQL Workbench on your system, you’ve come to the right place. In this step-by-step guide, we’ll walk you through the installation process.

Installing MySQL on macOS

Step 1: Download MySQL

  1. Visit the official MySQL website at https://dev.mysql.com/downloads/mysql/.
  2. Scroll down to the “MySQL Community (GPL) Downloads” section.
  3. Under “MySQL Community Server,” click on the “Download” button for the macOS DMG Archive. This is the recommended option for macOS.
  4. You will be prompted to log in or sign up for a free Oracle web account. You can choose to skip this step by clicking the “No thanks, just start my download” link.
  5. The download should start automatically. Once it’s complete, locate the downloaded DMG file in your Downloads folder.

Step 2: Install MySQL

  1. Double-click the downloaded DMG file to open it. You should see an installation package inside.
  2. Double-click the installation package, which typically has a name like mysql-<version>-macos<version>.pkg. The version numbers may vary depending on the latest release.
  3. The MySQL Installer will open. Follow the on-screen instructions to complete the installation. You may be asked for your macOS password during the installation process.
  4. When the installation is finished, you should see a message indicating that MySQL was successfully installed.

Step 3: Start and Stop MySQL Server

By default, MySQL is set to start automatically when your computer boots up. To start and stop the MySQL server manually, follow these steps:

  • To start MySQL:
  • Open “System Preferences” on your macOS.
  • Click on “MySQL” to open the MySQL Preferences pane.
  • Click the “Start MySQL Server” button.
  • To stop MySQL:
  • Go back to the MySQL Preferences pane.
  • Click the “Stop MySQL Server” button.

Installing MySQL Workbench on macOS

Now that MySQL is installed, let’s set up MySQL Workbench, a user-friendly graphical tool for managing MySQL databases.

Step 1: Download MySQL Workbench

  1. Visit the official MySQL Workbench download page at https://dev.mysql.com/downloads/workbench/.
  2. Scroll down to the “MySQL Workbench” section and find the macOS version. Click the “Download” button next to it.

Step 2: Install MySQL Workbench

  1. Open the downloaded DMG file for MySQL Workbench.
  2. Drag the MySQL Workbench application icon into the “Applications” folder to install it.
  3. Wait for the copying process to complete.

Step 3: Launch MySQL Workbench

  1. Navigate to your “Applications” folder.
  2. Find and open the MySQL Workbench application.

Step 4: Configure MySQL Workbench

When you first launch MySQL Workbench, you will need to set up a connection to your MySQL server. Here’s how:

  1. Click the “+” symbol next to “MySQL Connections” under the “Instance” section in the home screen.
  2. Enter a connection name in the “Connection Name” field. This can be any name you choose, such as “Local MySQL.”
  3. In the “Connection Method” section, select “Standard (TCP/IP).”
  4. Enter “localhost” in the “Hostname” field.
  5. Leave the “Port” field as the default (3306).
  6. Enter your MySQL username and password in the respective fields. If you haven’t set up a MySQL user, you can use the default “root” user and the password you created during the MySQL installation.
  7. Click “Test Connection” to verify that MySQL Workbench can connect to your MySQL server.
  8. If the test is successful, click “OK” to save the connection settings.

Now you have MySQL and MySQL Workbench installed and configured on your macOS system. You can use MySQL Workbench to manage your databases, create tables, run queries, and perform various database-related tasks with ease.

Congratulations! You’re all set to start working with MySQL and MySQL Workbench on your macOS machine. Enjoy exploring the world of relational databases!

Series Navigation<< Demystifying DBMS vs. RDBMS: Unraveling the Database JargonDemystifying SQL Syntax: Key Aspects and Details >>

Leave a Reply

Your email address will not be published. Required fields are marked *