Install Mysql Mac Catalina

What is MySQL Workbench?

  1. Install Mysql 5.6 Mac Catalina
  2. Install Mysql Mac Catalina Free
  3. Can I Install Mysql On Mac
  4. Install Apache Php Mysql Mac Catalina
  5. Install Mysql 5.7 Mac Catalina

MySQL Workbench is a GUI tool to manage your database. You can see the tables, records in the table, you can create a new schema, query, etc.

In the previous article, we have learned how to install MySQL Server on a Mac. I was running macOS Catalina on a Hackintosh system. It runs very well until now. But for some reason, I have to remove or uninstall the MySQL Server from my Hackintosh system. Well, there are some easy steps to uninstall MySQL Server from macOS Catalina. For example, if your Mac came with macOS Big Sur, it will not accept installation of macOS Catalina or earlier. If a macOS can't be used on your Mac, the App Store or installer will let you know. For example, it might say that it's not compatible with this device or is too old to be opened on this version of macOS. Installing MySQL on your own Mac. There are several different ways to install MySQL on Mac OS X. We have provided links to the most common installation methods for Mac OS X. Using the official.pkg installer. This is the fastest method for installing MySQL on your Mac, but only available for Intel processors. Recently I came across a very strange issue on my MAC OSX Catalina 10.15.0 where MySQL server wouldn't start. I've tried so many options and solutions but failed every single time. What i investigated while solving the fix for this issues as it seems like some sort of a conflict between the old MySQL versions.

If you are more of a visual person who needs to deal with database (MySQL), MySQL Workbench is a very powerful and useful tool.

Before Installing MySQL Workbench on macOS

Before installing the MySQL Workbench, make sure you have access to the database. It is either db in your local system or it could be a remote database in your hosting server or even cloud database such as AWS RDS.

In this post, I will be using local MySQL server as an example. Please check out this post on installing MySQL server on your Mac.

Installing MySQL Workbench on macOS

Go to https://dev.mysql.com/downloads/workbench/

Click Download to get the DMG installer

Once Installer is downloaded, double click the installer. When you double clicked, you should see the screen like below. Follow the instruction to drag the MySQL Workbench icon to the Application folder to complete the installation of MySQL Workbench into your system.

Launching the MySQL Workbench App

Once the MySQL Workbench is installed and when you try to open the app, you might see the message like below. Press Open to proceed on launching the application.

Once the start up screen shows up, you will see a connection already added (assuming you have installed local MySQL server)

Click the Local instance 3306. It will ask for the password. Enter the password you entered when you set up the local MySQL server and press OK. (You can check the Save password in keychain. In this way you do not need to type the password every time you access to your database)

Creating the Schema

Now you have access to your local database server (MySQL server). You can start creating your own database. Schema is the main container of database where you put the tables. Let’s try to create a schema. Click the Create New Schema icon (highlight in below screenshot)

Assign some name on your new schema. In this example, let’s use test_db as a schema name and press Apply.

You will see a dialog box to review the SQL Script to execute by an app. Basically, it will execute an SQL statement of CREATE SCHEMA `test_db`;

Press Apply to create a new schema.

Select Schemas tab and verify the new schema is added.

Creating the Table

Once schema is created, you need to create a table to actually store the data in the “database”.

Expand the test_db schema and right click on the table.

Select Create Table...

Start entering values in the column section. This will be the identifier for the specific field in the database.

Enter the following entities in the table.

PK - Primary Key. Usually the “id” will be your primary key.

NN - Not Null. For entities, you don’t not want to have Null value (empty value) by the time the record is inserted. Put check on this if there is a specific entity you want have some value on it. For example, id entity must have a value always. So for id, put check on NN.

UQ - Unique. If the record entered in the table needs to be unique, put check on this. For example, “id” must be unique so that when you query for specific id, it will only return 1 result.

BIN - Binary

UN - Unsigned

ZF - ZeroFill

AI - Auto Increment. For values you want to automatically increment, put check on this. Typically id should have auto increment on. So every time there is a new record added, the id value will auto increment.

G - Generated

Press Apply and you will the above confirmation. Press Apply again to add some records in your table.

Install mysql workbench mac catalina

Go to your schema, and expand the table. You should be able to see the table you just created.

Mac

Access to the Table

To view the table you created, go to the table you created.

Right click and select Select Rows - Limit 1000

At this point, the table has 0 record. This is expected since the table has just created.

Mysql

Adding Sample Records

Once you have your table opened, you can directly add some records to it by simply double click the columns. Try entering the following records as an example and press Apply.

Press Apply to confirm the records you want to add in the table.
Note: You can leave the id column blank since this column is set to auto increment. It will automatically assign value as a new record is added.

Now you can see there are 2 records added in your table. You can see the id is automatically added in ascending value.

If you are using Big Sur on Apple’s new Silicon M1, checkout Using MySQL Workbench on macOS Big Sur blog post.

Latest Posts

Recommend switching to Docker

I finally switched to using Docker for local development on macOS. While the following tutorial works for macOS Catalina, it has limitations. I recommend following my latest tutorial on installing Apache, MySQL, and PHP on macOS using Docker.

Note: This post assumes you followed installing Apache, PHP, and MySQL on Mac OS X Mojave and have since upgraded to macOS Catalina. If you did not follow the original post, you should follow installing Apache, PHP, and MySQL on macOS Catalina.

When Mac OS X upgrades it overwrites previous configuration files. However, before doing so it will make backups. For Catalina the original versions may have a suffix of mojave or be copied to a backup folder on the Desktop. Most of the time, configuring your system after updating Mac OS X is simply a matter of comparing the new and old configurations.

Install Mysql 5.6 Mac Catalina

This post will look at the differences in Apache, PHP, and MySQL between Mac OS X Mojave and macOS Catalina.

Updating Apache

Mac OS X Mojave and macOS Catalina both come with Apache pre-installed. As noted above, your Apache configuration file is overwritten me when you upgrade to macOS Catalina.

There were a few differences in the configuration files. However, since both Mojave and Catalina run Apache 2.4, you could simply backup the configuration file from Catalina and overwrite it with your Mojave version.

However, I encourage you to stay up-to-date. As such, you should take the time to update Catalina's Apache configuration. First, create a backup and compare the two configuration files for differences.

Now edit the Apache configuration. Feel free to use a different editor if you are not familiar with vi.

Uncomment the following line (remove #):

In addition, uncomment or add any lines you noticed from the diff above that may be needed. For example, I uncommented the following lines:

Finally, I cleaned up some of the backups that were created during the macOS Catalina upgrade. This will help avoid confusion in the future.

Note: These files were not changed between versions. However, if you changed them, you should compare the files before running the commands.

Restart Apache:

Updating PHP

System

Mac OS X Mojave came with PHP version 7.1 pre-installed. This PHP version has reached its end of life. macOS Catalina comes with PHP 7.3 pre-installed. If you added any extensions to PHP you will need to recompile them.

Install Mysql Mac Catalina Free

Also, if you changed the core PHP INI file it will have been overwritten when upgrading to macOS Catalina. You can compare the two files by running the following command:

Note: Your original file may note be named something else. You can see which PHP core files exist by running ls /etc/php.ini*.

I would encourage you not to change the PHP INI file directly. Instead, you should overwrite PHP configurations in a custom PHP INI file. This will prevent Mac OS X upgrades from overwriting your PHP configuration in the future. To determine the right path to add your custom PHP INI, run the following command:

Note: It appears Catalina does not include the PHP Zip extension. This is a popular extension used by many packages. This was one of the reasons I switched to using Docker.

Can I Install Mysql On Mac

Updating MySQL

Install Apache Php Mysql Mac Catalina

MySQL is not pre-installed with Mac OS X. It is something you downloaded when following the original post. As such, the macOS Catalina upgrade should not have changed your MySQL configuration.

Install Mysql 5.7 Mac Catalina

Find this interesting? Let's continue the conversation on Twitter.