Installing MySQL 8 on Windows 10
We will consider in detail the process of installing the free edition of MySQL 8 Community on the Windows 10 operating system.
WHAT IS MYSQL?
MySQL is a free relational database management system. MySQL development and support is provided by Oracle.
MySQL is a very popular DBMS, it is actively used on the Internet as a system for storing data on sites, in other words, the vast majority of sites on the Internet to store their data use MySQL.
Recently I have been analyzing data from several official ratings of DBMS popularity and other statistical information in order to determine which DBMS is really the most popular, and as a result, MySQL is currently the most popular DBMS in the world. You can get acquainted with all the results of my analysis in the material — TOP 5 popular database management systems.
MYSQL 8 EDITIONS
MySQL 8 is released in several editions:
MySQL Standard Edition
MySQL Standard Edition is an edition with standard functionality that allows you to implement high-performance, reliable and scalable applications.
MySQL Enterprise Edition
MySQL Enterprise Edition — this edition includes full functionality and a set of additional tools that are designed to achieve the highest scalability, security and reliability.
MySQL Cluster Carrier Grade Edition
MySQL Cluster (CGE) is a distributed database that combines linear scalability and high availability. It is designed for critical applications.
MySQL Community Edition is a free edition, which can be downloaded absolutely freely from the official MySQL website. The Editorial Office supports all the necessary functionality to implement full-fledged Internet resources.
More information about MySQL Edition can be found on the official website — https://www.mysql.com/products/.
STEP-BY-STEP INSTALLATION OF MYSQL 8 ON WINDOWS 10
Now we will take a step-by-step look at the whole process of installing MySQL 8 in Community edition on Windows 10.
Besides MySQL Server, we will also install MySQL Workbench — a tool used for database development and administration of MySQL Server.
Note! To install MySQL 8 on Windows 10 you need Microsoft .NET Framework 4.5.2 or higher.
STEP 1 — DOWNLOAD MYSQL 8 FOR WINDOWS 10
To proceed to the installation of MySQL 8, you must first download the MySQL distribution kit.
You can download MySQL 8 in Community edition, as it was already mentioned, absolutely free from the official website, here is the link to the download page — https://dev.mysql.com/downloads/installer.
After going to the page you can choose how to download the distribution, we offer two ways:
- Download Web Installer — a small program that downloads all necessary components for MySQL installation. You can use it to install MySQL on computers that have the Internet;
- Download Full Installer — the MySQL distribution kit that includes all the necessary components. In this case you can use this distribution to install MySQL on a computer with or without access to the Internet. For example, you can download this file on a computer with Internet access and use it to install MySQL on another computer that has no Internet access.
For example, let’s download the full MySQL distribution, for this click “Download” opposite the corresponding item.
Then we are asked to login using Oracle accounts, if any, or to register, thereby creating an Oracle account.
However, if you don’t want to, there is a link “No thanks, just start my download” at the bottom of the page, by clicking on which MySQL download will start immediately.
Click on this link and wait for the download to complete.
As a result, you should download the mysql-installer-community-184.108.40.206.msi file, which is about 415 megabytes in size.
STEP 2 — RUN THE INSTALLATION AND CHOOSE MYSQL INSTALLATION TYPE
Then we launch the downloaded file and the MySQL installer will be launched. First we choose the type of installation.
We’re being offered several options:
- Developer — is the default option, it assumes installation of all that a developer needs, this is both MySQL Server and MySQL Workbench and other tools for working with MySQL;
- Server Only — this option assumes installation of MySQL server only;
- Client Only — this option assumes installation of the client part only to work with MySQL Server, i.e. the server part will not be installed;
- Full — install all components included in the distribution kit;
- Custom — selective installation, in this case you can install only what you need.
The default option, i.e. Developer, is suitable for most cases, especially if you are installing MySQL on your home computer for some purpose (learning MySQL, learning SQL, etc.).
I leave this option, click “Next”.
STEP 3 — CHECKING AND INSTALLING ADDITIONAL COMPONENTS
The installer will then check the system for components that are required for some MySQL extensions to work.
In my case the installer generated two warnings for MySQL For Excel and MySQL For Visual Studio extensions.
If you plan to use these components, you need to eliminate these warnings. To do that, you in turn need to install these components (i.e. select them and press “Execute”, some of them can be installed automatically).
However, if you will not use MySQL For Excel and MySQL For Visual Studio extensions, you can press “Next” right away.
The installer will warn you if some components are missing by clicking “Yes”.
STEP 4 — INSTALLING MYSQL COMPONENTS
Everything is ready for MySQL installation, at this step the installer will display all MySQL components that are ready for installation, click “Execute”.
As a result, the serial installation of MySQL components will begin.
STEP 5 — FINISHING THE MYSQL COMPONENT INSTALLATION
When a green checkmark appears opposite each item, the setting is complete. Press “Next”.
STEP 6 — CONFIGURING MYSQL COMPONENTS
All components are installed, but not all are configured, so we need to configure them. The installer will show you which specific components you need to configure. In our case it is MySQL Server, MySQL Router and Samples and Examples. Click “Next”.
STEP 7 — CONFIGURING MYSQL SERVER (HIGH AVAILABILITY PARAMETER)
First of all, we need to configure MySQL Server.
The first thing we need to do is to configure the “High Availability” parameter which is responsible for how MySQL Server will be installed.
In our case, as in most others, we need a standard “Standalone MySQL Server” — this is a classic version of MySQL Server installation.
So we select the first item and click “Next”.
STEP 8 — CONFIGURING MYSQL SERVER (TYPE AND NETWORKING)
Then we configure the server type and network. In our case you can leave everything by default:
- Type — Development Computer;
- Protocol — TCP/IP;
- Port — 3306;
- Tick “Open Windows Firewall ports for network access”.
If necessary, you can fine-tune MySQL Server using advanced settings. To do this, tick the “Show Advanced and Logging Options” checkbox.
Click “Next” to continue.
STEP 9 — CONFIGURING THE AUTHENTICATION METHOD IN MYSQL SERVER
8 version of MySQL supports the new authentication method, which is recommended to use, leave it as is and click “Next”.
If necessary, you can select the second item that was used in MySQL 5.
STEP 10 — CONFIGURING MYSQL USERS
After that we need to come up with a password for user root (this is the main administrator of MySQL).
In addition, we can add more users to do this by clicking on “Add User”.
And enter the necessary data:
- User Name — enter a user name;
- Host — leave “All Hosts”;
- Role — select the role of the user;
- Password and Confirm Password — create and enter the password that this user will have.
After that the user will be created.
Click “Next” to continue.
STEP 11 — CONFIGURING MYSQL SERVICE IN WINDOWS
Now we need to configure the MySQL service that will work in Windows.
We can set it up:
- Windows Service Name;
- Start the MySQL Server at System Startup — if this checkbox is enabled, the MySQL service will be started when Windows starts;
- Run Windows Service — on behalf of which account MySQL service will work in Windows. Standard System Account is a system account.
You can leave it as default, that’s what I do.
STEP 12 — APPLYING MYSQL SERVER SETTINGS
All MySQL Server settings are configured, but we still need to apply and save them. To do this, on the next window click “Execute”.
STEP 13 — FINISHING MYSQL SERVER CONFIGURATION
When all the checkboxes have been placed and the “Successful” message is displayed, the process will be completed, click on “Finish”.
The status of MySQL Server will be changed to “Configuration complete”.
To continue configuration, click “Next”.
STEP 14 — CONFIGURING MYSQL ROUTER
In this case, we are offered to configure the MySQL router, but it is not necessary, we can immediately click “Finish”.
Click on “Next” to proceed to the next component setting.
STEP 15 — INSTALLING TEST DATA ON MYSQL
Then we can install test data on MySQL Server, for example, for training. To do this, enter the Root user password and click on “Check” to check, if the connection is established, then everything is fine and we can continue.
Click on “Next”.
To apply all parameters and start extracting test data on MySQL Server, click “Execute”.
The process will be completed when the “Successful” message is ticked and displayed.
Click on “Finish”.
STEP 16 — FINISHING MYSQL COMPONENT CONFIGURATION
All components are configured. Press “Next”.
STEP 17 — COMPLETING THE ENTIRE MYSQL INSTALLATION AND CONFIGURATION PROCESS
MySQL Server and all the necessary components to work with it are installed and configured: these are MySQL Workbench, and various connectors, documentation, and even a test database.
To start MySQL Workbench immediately after installation, tick the “Start MySQL Workbench after Setup” box.
RUNNING MYSQL WORKBENCH
After installing MySQL, all the necessary shortcuts that you can use will appear in the Windows 10 menu.
For example, you can use the appropriate shortcut to run “MySQL Workbench 8” environment.
CONNECTING TO MYSQL USING MYSQL WORKBENCH
To connect to MySQL server and look at database objects, tables, views and so on, run MySQL Workbench, for example, as described above.
This will open MySQL Workbench, where on the start page we already have one connection to the local server, which will be carried out as root.
Click on it.
Then we enter the password to save it and not to enter it every time we connect, we can check “Save password in vault”.
As a result, we will connect to the server, and in order to view the data schema, we need to go to the “Schemas” tab in the navigator window.
In addition, we can hide unnecessary windows, to do this we can use special icons in the upper right side of MySQL Workbench.
We will see the data schema, now we can see what objects are in the database and, for example, learn to write SQL queries.
For clarity, I have hidden a side window.
In this example, we sent a SELECT query to select data from the address table. As you can see, the data has returned and everything works.