Last week I got an assignment where I need to install MySQL server on client’s machine, after checking the system requirements, I came to know that, the machine contains the 64 bit windows operating system. So I thought to download MySQL community server for windows 64 bit operating system, but I found that the website provides only 32 bit installer for windows, and for 64 bit operating system, the website provides the zip file for download. My client needs to manage the MySQL products by himself; he was expecting software where he can manage all MySQL products at one place, so we need MySQL installer in that machine. So I decided to install MySQL server on windows machine using MySQL installer web community. In this post, let me go through the step by step guide to install MySQL server on windows machine.
After reading this completely you can answer the following question:
- How and where to get MySQL community edition?
- How to install MySQL server on windows?
- How to configure MySQL server using windows installer?
- How to create and assign roles to user using MySQL installer?
- How to activate MySQL log files on production machine?
MySQL community server:
Oracle provides two editions of MySQL server, enterprise edition and community edition, in our post we are using MySQL community server you can get the MySQL community server from the following link, MySQL community edition.
After reading the features of the MySQL community edition, there is a link at the bottom, by clicking on that link, you will get all the products available from MySQL, click on the MySQL community server and you will get the link for MySQL community server installer.
In my case I needed web installer, since I was trying to install MySQL community server on 64 bit windows operating system, if you face similar situation you can get the MySQL web server community from clicking on the following link MySQL web community server, click on the first result, it will directly take you to the web community installer page. Note that for running MySQL web installer you need online connection and
Installing MySQL server on Windows machine:
After complete the first step, you will get the MySQL installer in your system, the next step will be installing the MySQL server on windows machine using windows installer. Right click on the file you recently get and click on install, see the following image for detail:
|MySQL installer web community|
Now the MySQL installer will start running, at the first step it will display the license agreement, after completely reading the agreement click on Next button present at the bottom of the page.
|MYSQL LICENSE AGREEMENT|
Choosing the setup type:
After clicking on the Next button, you will get the choosing set up type window, where you will different set up types provided by MySQL. By selecting this setup type you are choosing which MySQL products will be installed on your system.
The setup type window contains the following types:
: Developer is the default setup type. Choosing this type will install all products needed to develop applications with MySQL.
Choosing this type will install only the MySQL community server. :
Choosing this type will install only the MySQL client products, such as MySQL Workbench. This setup type does not include the MySQL community server. :
This setup type will install all available MySQL products such as server, client products, workbench, etc. :
By choosing this setup type you can manually select the MySQL products to install, and optionally configure custom MySQL data and installation paths. :
I recommend you to choose the Custom type for beginners so that you can get an idea of all the products available from MySQL, by mistake if you not selecting some products for installation at this stage, no problem you can add the required product later using MySQL installer.
The choosing setup type window may look like this:
|CHOOSING SETUP TYPE|
Selecting products and features:
After choosing the setup type and clicking on the next button, product and features selection windows will be opened, depends upon the setup type MySQL products will be displayed here for selection, if you clicked Custom setup type in previous window, all the MySQL products will be displayed in this window, you can select the required MySQL products for installation, even if you not selected some required products or features or selected some extra products you can add or remove those products later. After selecting the required products and features click on the Next button.
The selecting products and features window may look like as follows:
|SELECT PRODUCTS AND FEATURES|
Once the products and features are selected, the MySQL installer will check for pre-requisites required for the selected products to install on windows machine. In check requirement window you can see tab called status, it contains the value Manual for some requirements and remaining requirements it contains the value it displays Blank space. For MySQL installer will automatically install the products for which the status showing Blank space, but for products in which the status showing Manual you have to manually install that particular products. After manually installing the required products, click on the Execute button, now the MySQL installer will start installing the remaining products. The checking requirement window may look like as follows:
During this process new pop-up windows may displayed where you have to choose Install button to install those particular products, the pop-up windows may look like as follows:
After clicking on Next button, the MySQL installer will open the installation window.
MySQL installer will display the list of all the selected products to be installed on the windows machine. At the bottom of the windows, you will see a button called Execute by clicking on that button, the MySQL installer will start installing the selected products, and you can view the progress and status of the installation process. After all the selected components are installed on your machine, the MySQL installer will display a new window where you can configure the recently installed MySQL products. The installation window may look like as follows:
Product configuration windows will provide an overview of the products which you are going to configure in the next window and the configuration status. After checking the product and configuration status, click on the Next button to open the configuration window. The product configuration window may look like as follows:
Configuration type and Connectivity:
The type and networking window allows you to choose the configuration type and connectivity. The type and networking window may look like as follows:
|TYPE AND NETWORKING|
Server configuration type:
Configuration type defines the amount of system memory that will be assigned your MySQL server instance. There are three different configuration types available in MySQL community server, let’s take a look at those types:
: A machine that will host many other applications. This option configures MySQL to use the least amount of memory. If you want to install MySQL on your laptop or desktop use this option.
Machine: Several other applications will be running on this machine, such as a web server. This option configures MySQL to use a medium amount of memory.
Machine: Choose this option if you need a dedicated machine for MySQL database server. No other servers, such as web servers will be run on this machine. By choosing this option MySQL will make use of all available memory.
|SERVER CONFIGURATION TYPE|
After choosing the configuration type, you have to choose the connectivity option. Connectivity options lets you control how the connection to MySQL is made. Connectivity options include:
: If you need to access your database over internet choose this option, without choosing the option only localhost connections are allowed. You have to define the and click on the check box to open the firewall port for network access. The default port number for MySQL instance is 3306.
: Enable and define the pipe name, similar to using the
: Enable and then define the memory name, similar to using the
By selecting Advanced Configuration box will allow you to configure the logging options including setting up custom file paths for the error log, general log, slow query log (including the configuration of seconds it requires to execute a query), and the binary log.
After choosing appropriate options for type and networking, the window may look like as follows:
|TYPE AND NETWORKING|
Accounts and Roles:
After choosing the MySQL server configuration type and connectivity options, the next window allows you to set root account password and allows you to create MySQL user accounts.
Set the root password, the password strength will be shown at bottom of the text box. Click on Add User button to add new user and assign roles to recently created user.
The Accounts and Roles window may look as follows:
|ACCOUNTS AND ROLES|
The Add User window may look like as follows:
|ADD NEW USER WINDOW|
The available user roles are given below:
After setting the root password and creating new user (optional) click on Next button.
The windows service window will allows you to configure the windows service options. In this window you have to setup the windows service details. You have to provide a unique name for each server instances. The default windows service name is MYSQL57 for MySQL community server 5.7.1. If you need to run MySQL server under a given user account, you can choose the Custom User option. Keep in mind that, if you need to choose Custom User option, the custom user must have privileges to log on to Microsoft Windows as a service. After choosing the required options click on Next button.
The windows service option may look like as follows:
In advanced option, you can configure the custom path for MySQL error log, general log, slow query log and binary log. After selecting the required logging options click on Next button.
The advanced option window may look like as follows:
Apply server configuration:
By clicking on the execute button on all the configuration will be applied to the MySQL community server installed on your windows machine. The icon for each step toggles from white to green on success, or the process stops on failure. The Log tab used to view the log. The apply server configuration window may look like as follows:
|APPLY SERVER CONFIGURATION|
Once the configurations are applied to the server and click on the next button the installation complete window will be opened. Now the MySQL community server is installed on your windows computer and MySQL installer is added to your start menu.
I hope this post will help you to install MySQL community server on your windows machine. If you have any queries or want to share your thoughts, use the comments section. If you like this post, kindly share it with your friends.