Data Architecture—Step 1: Install MySQL v8.0.x - Woz-U-Group-Projects/team-the-grinchs-posse GitHub Wiki

Install MySQL v8.0.x

by Robert Hieger

The data architecture for this project went through no less than 7 iterations, as flaws were ironed out. Because the procedure involves multiple technologies and layers of complexity, I thought it wise to document the process I followed here for the rest of the team. Installing MySQL's most recent release is Step 1. Here I document how to install the server on Windows and MacOS. Unix and Linux variants of the server would have similar install processes, but are beyond the scope of this documentation, as there are plenty of excellent tutorials covering install procedures for these platforms.


I. How to Install and Configure MySQL Server Engine on Windows

Because we are using the Sequelize ORM for object relational modeling of the database, and MySQL v8.x has a new authentication protocol based on SSH that it does not support, special care is needed to tell the MySQL installer to use the older MySQL native authentication protocol. I will cover installation on both Windows and MacOS due to our heterogenous development environment.

If you are using a Mac, you can skip to Section II, which explains installation on a Mac.

Head to the downloads page for the current Community Edition Server for Windows:

Version 8.x Windows Installer

Here you will see the download options shown in Fig. 1-1 below.

MySQL Windows Installer Download Page Fig. 1-1: MySQL Windows Download Page

The downloads page gives you 2 options. The top one is a web-based installer. Probably this one is best suited to users with a speedy internet connection. The full download is over 320MB. The second option is a full MSI (Microsoft Installer) of the entire package, weighing in currently at 324.3MB.

I would recommend using the second option as install will likely proceed at least somewhat faster. And in the final analysis, you can always delete the MSI after you perform the installation.

  1. Run the installer. You will be presented with several installation options. For our purposes, it is best to select the Developer Default installation option, as shown in Fig. 1-2.

Choosing Installation Options on Windows Fig 1-2: Choosing MySQL Install Option

  1. Required Dependencies. Depending on the software installed on your system, you might see the dialog box shown in Fig. 1-3. Here, if you are using a 64-bit version (x64) of Windows, you will need to choose the top Visual C++ Redistributable package. If you are using a 32-bit version of Windows, you will need to select the bottom Visual C++ Redistributable package.

Install necessary Visual C++ Redistributable Dependency Fig. 1-3: Installing Visual C++ Redistributable

  1. After following the directions in the installer, at the completion of installation, you will see the dialog box shown in Fig. 1-4. Here you choose configuration options. You should make sure your configuration options look like those below. NOTE THE WARNING ICON NEXT TO Port Number: This warning is there only for the source of this screenshot because that port number was used on thee system in question. It therefore had to be changed to another number. If you have not installed MySQL before, you should not see this icon.

Configuration options Fig. 1-4: Setting Configuration Options

  1. On the next dialog box shown in Fig. 1-5, you are given the option of which authentication protocol to use with MySQL. Due to incompatibilities with *Sequelize, make sure to select **Use Legacy Authentication Method (Retain MySQL 5.x Compatibility).

Authentication protocol selection screen. Fig 1-5: Selection of Authentication Protocol

  1. On the next dialog box of importance, shown in Fig. 1-6, you will see a name chosen by default for the service that Windows will run at startup to launch the MySQL server. If you prefer to manually start the server only when you need it, simply uncheck the checkbox that says Start the MySQL Server at System Startup.

System Service dialog box Fig. 1-6: Decide Whether MySQL will launch at system startup

  1. The next dialog box, shown in Fig. 1-7, is where you apply the configuration for the MySQL installation. None of the radio buttons need be selected. You can simply click on the Execute button.

Apply MySQL configuration. Fig. 1-7: Apply MySQL configuration

  1. As seen in Fig. 1-8 below, after you press the Execute button, the installer proceeds through all the steps of the configuration button, and finally you should click the Finish button shown below.

Click the Finish button. Fig. 1-8: Click the Finish button

  1. In the next dialog, as shown in Fig. 1-9, you should click the Next button.

Dialog box with NEXT button. Fig. 1-9: Click the Next Button

  1. The final dialog box, shown in Fig. 1-10, gives you the option to launch the MySQL Workbench, if you selected it for install during the installation process. If you don't wish to launch the Workbench, simply deselect the checkbox for that option. Finally, click the Finish button, which completes the installation of the MySQL Engine.

Click the Finish button. Fig. 1-10: Click the Finish Button

Optional But Highly Recommended: Install MySQL Shell

The new MySQL Shell is a versatile replacement for the CLI. The shell, is, itself, a CLI, but a far more feature-rich CLI, including support for JavaScript-based interaction with MySQL data, integration with NoSQL document-based data such as that found in MongoDB, effectively giving the best of both worlds of relational database tables and document-based data models.

On Windows, installation of the Shell is an option at install time and if selected, will be installed along with the rest of the selected installation options.

Fig.1-11 below shows login to a MySQL session using the new MySQL Shell on MacOS. The appearance of the shell will be quite similar on Windows.

MySQL Shell showing login. Fig. 1-11: MySQL Shell login and switch from JS to SQL mode


II. How to Install and Configure MySQL Server Engine on MacOS

Head to the downloads page for the current Community Edition Server for MacOS:

Version 8.x MacOS DMG Installer
NOTE: The web site will automatically detect that you are using MacOS and select that for you in the dropdown menu as shown in Fig. 2-1.

MacOS DMG Installer Selection Screen Fig. 2-1: Choose MacOS installation for MySQL

I would recommend using the first installer, the DMG installer, rather than the TAR archives that follow. When you click the download button for the DMG installer, you will be routed to the signup page shown in Fig. 2-2.

MySQL User Signup Page.
Fig. 2-2: MySQL User Signup/Download

  1. Login, Signup or Just Download DMG Installer. As Fig. 2-2 shows, you are given the option to log into your existing Oracle Web account, create one, or if you prefer not to make that decision at this time, you may click on the No thanks, just start my download link.

  2. Double Click DMG Installer, then Double Click Install Package. You will find the DMG archive Installer in your Downloads folder. Once you have double clicked this, your archive will be verified and you will see the folder with the PKG installer shown in Fig 2-3 below. Double Click the PKG file to launch the installer package.

MacOS PKG Installer for MySQL Fig. 2-3: Double Click PKG Installer to launch MySQL Installer

  1. Click Continue to Check if Install is Possible. Click the continue button shown in Fig. 2-4, and the installer will check that MySQL can be installed on your system.

Click on Check to continue. Fig. 2-4: Click Check to continue

  1. Click Install. After a couple of confirmation dialog boxes that ask you to agree to the license, you will be presented with the dialog box below in Fig. 2-5, where you click the Install button to begin the installation.

Screenshot of Install dialog box. Fig. 2-5: Click the Install button

NOTE: From this point forward, because I already have MySQL installed on my machine, I have used screen shots from this video tutorial.

After clicking Install, you will see the progress indicator shown in Fig. 2-6 below.

Preparing to Install Fig. 2-6: Preparing to Install…

  1. Enter your password. Your user name should appear in the dialog box as shown in Fig. 2-7. You should enter your password and click the Install Software button. The installer will then commence install of the MySQL server to your Mac.

Enter Password and click Install Software Fig. 2-7: Enter password and click Install Software

After you click Install Software, you will eventually see the progress indicator shown in Fig. 2-8.

Writing files... Fig. 2-8: Writing files…

  1. Select Use Legacy Password Encryption. Upon completion of installation, you will see the dialog box shown in Fig. 2-9. This is the most important step of the installation. In order for MySQL 8.0.x to work with Sequelize, you must select the Use Legacy Password Encryption, unlike shown in the Figure below. Then click the next button to proceed to the Next dialog box.

Configuration dialog box Fig. 2-9: Choose configuration options

  1. Enter Password for Root User. As shown in Fig. 2-10, enter the password of your choice, then click the Finish button.

Enter Password for Root User Fig. 2-10: Enter password for root user

  1. Enter Password to Authorize System Changes. The next dialog box, shown in Fig. 2-11, informs you that the installer wants to make changes, and asks for your password. Enter your MacOS user password to authorize, and click the OK button.

Installer wants to make changes. Fig. 2-11: Installer wants to make changes.

After you click the OK button, you will see the dialog with the progress indicator shown in Fig. 2-12.

Configuration Progress Indicator. Fig 2-12: Performing initial database setup…

  1. Click Close Button. If you encounter no errors, when the database setup completes, you will see the dialog in Fig. 2-13, which informs you that the installation completed successfully. You may then click the Close button.

Click Close Button Fig. 2-13: Click Close button

  1. Click Move to Trash. You will next see the dialog box in Fig. 2-14, that gives you the option to move the installer to the trash. As you are not likely to need it again and it can always be downloaded again, click the Move to Trash button.

Move to trash dialog box. Fig. 2-14: Move to trash

You have now successfully installed MySQL Server v8.0.x.

Optional But Highly Recommended Install—MySQL Shell

On MacOS, the MySQL Shell is a separate DMG installer, which may be found here. The install process is roughly the same as for the MySQL Server.

Exploration of how the MySQL Shell works is beyond the scope of this documentation. If you are interested in using it, there are numerous tutorials on the web which can bring you up to speed on the basics.

You can now click the link below to proceed to Step 2.


Proceed to Step 2 | Return to Wiki Home