We have finally come to the end of this series of posts. I believe that in a serious PHP development environment a MySql installation cannot be missing. So today we are going to see how we can install a MySql instance in a Windows environment.

Let’s start by downloading the software. You can find the MySql free download in the “MySql Community Downloads” page which resides at the following address: https://dev.mysql.com/downloads/.

I suggest you to download and use MSI package “MySql Installer for Windows”. It’s basically a program which allows you to install various components of MySql. We are going to use it to install MySql Server and MySql Workbench (a kind of Sql Server Management Studio).

Once the download is completed, run the MSI package to begin the installation process. This is the first step of the installation:

First step of MySql installation

In this post we will select a “Custom” installation, but of course, according to your needs, there nothing wrong with the other options. So select “Custom” and click “Next”.

Select the components you want to install

In the next step you have to select which components you want to install. In this example we will select “MySql Server” and “MySql Workbench”. Be sure to bring them in the right panel, then click “Next”.

We are ready to install the selected components

Click on “Execute” to confirm you want to proceed. The installation will take few minutes. Once completed, you will see the following form.

Installation completed

After the installation, you will requested to provide some configuration info, as indicated in the following form.

Ready to configure MySql

In the following form, choose “Standalone MySql Server / Classic MySql Replication”.

High availability configuration

In the following form be sure to select “Development computer”, then leave the default for other options.

Configuring type and networking

In the following form choose “Use strong password encryption for authentication” and click “Next”.

Configure authentication method

In the following form you have to set the password for the root user. You can also create other users here. It is at your discretion, but consider that you can also create new users at a later time. Click “Next” to proceed.

Configure root password and other accounts

In the following form I suggest you to configure MySql Server as a Windows Service. Depending on your needs you may think not to run MySql service when Windows starts, but to run it when you need it to save some boot time and memory. In this case we will select the option “Start the MySql Server at System Startup”. Click “Next” to confirm.

MySql Server service configuration

You will be prompted with two or three forms where you can simply click “Next”. When you get to this form you can click on “Finish” to complete the installation.

The installation has been completed.

Congratulations, you have just installed MySql Server and MySql Workbench.

Let’s test our installation

Let’s make a simple test to check if MySql is working. We can do this running MySql Workbench. You will see the following window:

MySql Workbech at work

We need to create a new connection, so click on the “plus” button next to the text “MySQL Connection”. The following window will appear:

The form above is configured to connect to a local MySql Server instance using the standard TCP/IP port. Click “Ok” to proceed. You will be asked to insert the password:

Insert the password of your user

Insert the password. I usually check the option “Save password in vault” to avoid having to enter the password every time.

Click “OK” confirm. Now you will see a new box containing a connection named “Local”.

Double click the box to use that connection. You will see the new connection opened in a new tab. Here you can create databases (or “schemas”), execute queries, administer your MySql instance and so on…

If you were able to do all the steps above, we can conclude that MySql is working correctly. That’s it for now…

Bye bye!! 🙂