Services Spotlight:

How To Install MySQL Server 5.6 on Windows 7 Development Machine

Written By Corlew Solutions
Updated February 9, 2015
Published July 31, 2014
Why Corlew Solutions?

We write great software and provide amazing technical support. Contact us today if you need help with a software project:

Article Technology Info

This article discusses the following technologies:

Introduction

MySQL is a popular open source database and it can easily be installed on WIndows 7. This guide will walk you through the process for downloading, installing and configuring MySQL Server 5.6.X to work on computer intended to be used as a development box. We will update this article regularly as the installation process for MySQL Server 5.6.X changes.

Step 1: Download MySQL Server

Head over to the MySQL downloads page. We’ll be downloading the MySQL Community Server Edition and there should be a Download button for the Windows (x86, 64-bit) installer towards the middle of the page. This single installer will allow you to install the 32bit or 64bit version of MySQL Server. Press the download button as shown in the graphic below:

The installer application itself is an x86 (.i.e 32bit) application which might be a little confusing if you plan on installing the 64bit MySQL Server. The 32bit installer application will allow you to install 64bit MySQL Server. On this next page, you will have the option of downloading the smaller Web Installer which is less than 2MB, or the full installer which is over 200 MB. If you choose the Web Installer, it will download the necessary components during the installation process. You might want the full installer if you plan on installing MySQL a computer that has limited internet access. Choose your installer and press the Download button.

Next, you will be asked to Login in or Sign Up. You can safely ignore this request and click on the little link at the bottom of the page that says, No thanks, just start my download.

Step 2: Install MySQL Server

This section will walk you through the steps involved with installing MySQL Server 5.6.

32bit or 64bit?

If you’re on Windows 7 32bit then you should only install MySQL Server 32bit. If you use Window 7 64bit, then you have the option, but the decision will be based on the other technology you intend to use with it. For example, if you’re using a 64bit programming language like Ruby, then you’ll want to pair that with the 64bit version of MySQL Server.

Installation Walkthrough

  • On the Welcome page, press the Install MySQL Products link.
  • On the License Agreement page, Check the box to accept the license terms and press Next.
  • On the Choosing a Setup Type choose Custom so you can decide exactly which packages to install. This is the only place where you can specify whether to install 32-bit or 64-bit MySQL Server.
  • On the Select Products and Features page, select the 32bit or 64bit versions of all the applications that you want. At the very least get:
    • MySql Server
    • MySQL Workbench (a UI used to manage your local databases)
    • MySQL Notifier (adds a tray icon that lets you quickly start/stop MySQL server)
    • MySQL Connectors (you’ll probably want to install them all because you never know which future tool might depend on a particular connector)
  • On the Check Requirements page, install any missing requirements by pressing the Execute button, or go back to the previous page and change the packages that will be installed to remove the requirement. Once all of the requirements are met, press the Next button.
  • On the Installation page, you will be shown a list of software that will be downloaded. Press the Execute button to begin the downloads.
  • At this point, you might get an error stating that the Connector/OOBC 5.3.2 failed to download. This is a known issue and the workaround is to run a separate Connector/OOBC installer. We’ll handle that at the end. Press the Next button to start the installation.

Add mysql command to the Windows PATH Variable

Adding MySQL to the Windows PATH variable will allow you run various commands from the console, and allow 3rd party applications to execute various MySQL commands.

  • Click the Start Orb
  • Right click on the computer menu/button Computer
  • Select the Properties menu option.
  • On the dialog that opens, select Advanced system settings.
  • Select the Advanced tab.
  • Click the Environment Variables button.
  • Select the Path variable in the table, then press the Edit button.
  • Append the path to your MySQL Server bin directory (make sure to add a semi-colon after any existing items in the path before appending the new path). The default path for a 64bit installation is C:\Program Files\MySQL\MySQL Server 5.6\bin.

Install Connector/OOBC

Head over to the OOBC Connector downloads page and grab the 32bit or 64bit installer - whatever matches the MySQL Server you plan to install. Run the Connector/ODBC installer and choose the Custom option when asked. Verify the path is the path you intend to install MySQL into and then press the Next button, followed by Install.

Step 3: Configure MySQL Server 5.6

When the installer finishes, a new configuration wizard will open.

On the Type and Networking page, click on the Config Type box to take a look at the available options. Each option contains a nice description to help you choose the type that makes the most sense. Since we don’t want MySQL Server to take over our development box, we’ll choose Development Machine.

Check the box for TCP/IP Networking and choose a port. Port 3306 is standard and works well so leave it alone unless you have a reason to change it. Check the box to Open Firewall port for network access. Lastly, click the Show Advanced Options checkbox and press Next.

On the next page, pick a good password for your MySQL root account. You can add any additional users you need now, or do this later when you’re setting up your application. Press Next when done.

On the next page for configuring the Windows Service Details, give your service a new name or leave the default suggestion in place. Next, decided on whether to Start the MySQL Server at System Startup. For a development machine, it makes sense to check this box. The last option, tells MySQL Server which user account to run under. Leave the box checked for Standard System Account unless you have an explicit reason not to. Press Next.

On the Advanced Options page, accepts the defaults unless you would like something non standard. Press Next to finish the configuration and installation. You should see the Configuration Complete message on the Configuration Overview page. You might also get a notification from Windows that the list of Services has changed as well. If you decided to install Samples and Examples, MySQL will need to briefly configure that as well, so press Next to start that configuration. When that is done, press Next to finish the configuration.

Step 4: Start and Stop MySQL Server

At this point, you should be on the Installation Complete page with MySQL Server running. If you choose to install MySQL Workbench, you will see a checkbox asking to open MySQL Workbench when the Installer closes. Make your choice and select Finish.

You can start and stop your MySQL Server on Windows by connecting to it in MySQL Workbench. This UI will allow you to administer your server, run queries, manage database, etc… If you installed the MySQL Notifier, you should have a tray icon that will allow you quickly start and stop the service. Lastly, you can jump straight to the Windows Services list by typing Services in Start Menu’s search box. Once the list of services comes up, find the name of the MySQL Service and right click over it. You should see option so Start/Stop the service.

Step 5: Test the Installation

If everyone has gone right, you should be able to open the command prompt and execute:

1
mysql -u root -p

At this point you should be prompted for the root password. Enter it and press continue. If you get an error saying the mysql command is not found, check the path variable again. Type the following on the command line and make sure the correct path is listed.

1
path

If the mysql command did work, type \q and press Enter to exit.

We hope you found this article useful. If you see any mistakes, missing features or ways to improve it, please let us know in the comments below so we can update its contents. If you're willing to link to us, we would sincerely appreciate it!

Corlew Solutions is a Web Design and Web Application Development company based in Fairfax Virginia, minutes away Washington D.C. If you're looking for great web design from the Northern Virginia area or web design from the Washington D.C. area we can help. Contact Us today!

comments powered by Disqus