How to Install MySQL Server on Windows Server 2019 Tutorial

How to Install MySQL Server on Windows Server 2019. In this article we will introduce MySQL server and talk about it’s features and proceed to the installation phase on Windows server 2019. 

What is MySQL

MySQL is a free, open source, and one of the most popular database management systems. It is easy to use, scalable and uses a relational database and SQL to manage its data. Generally, it is used in the modern web application as part of the popular LAMP and LEMP stack. MySQL server uses tables to store the data. A table is a collection of related data and it consists of columns and rows. It uses Structured Query Language to manipulate, control and query data.

Features of MySQL

  • Free and open source.
  • Supports large databases.
  • Scalable and customizable.
  • Concurrency Control.
  • Storage Engines
  • Supports many languages including, PHP, PERL, C, C++, JAVA, etc.
  • Stored Procedure.
  • Triggers.
  • Foreign key constraints.
  • Connectivity and Security.
  • Client/Server Architecture.
  • Secure and fast.

Follow this post next and we will explain how to install a MySQL server on Windows Server 2019.

Install MySQL Server on Windows 2019

At the time of writing this tutorial, the latest version of MySQL is version 8.0. Follow the below steps to install MySQL server on Windows 2019.

Step 1 – First, go to the MySQL download page and download the Full MySQL installer package as shown below:

Step 2 – Once the download is completed, double click on it to start the installation. You will be asked to select the setup type as shown below:

Step 3 – Select Full and click on the Next button to install all MySQL products. You should see the requirements check screen:

Step 4 – Click on the Execute button to install all required packages. Once all the packages are installed, you should see the following screen:

Step 5 – Click on the Next button. You will be prompt that “One or more product requirements have not been satisfied”:

Step 6 – Click on the Yes button. You should see the installation screen:

Step 7 – Click on the Execute button to start the installation. Once all the components have been installed, you should see the following screen:

Step 8 – Click on the Next button. You should see the product configuration screen:

Step 9 – Click on the Next button to configure the MySQL server. You should see the MySQL networking configuration screen:

Step 10 – Select your required configuration options and click on the Next button. You should see the authentication method screen:

Step 11 – Select your authentication method and click on the Next button. You should see the account and roles screen:

Step 12 – Define your root password and click on the Next button. You should see the MySQL service configuration screen:

Step 13 – Configure MySQL service and click on the Next button. You should see the MySQL logging option screen:

Step 14 – Select your logging options and click on the Next button. You should see the advanced options screen:

Step 15 – Define your server id and click on the Next button. You should see the Apply configuration screen:

Step 16 – Click on the Execute button to apply all the configurations. Once all the configurations are applied, you should see the following screen:

Step 17 – Click on the Finish button. You should see the MySQL product configuration screen:

Step 18 – Click on the Next button to configure the MySQL router. You should see the following screen:

Step 19 – Leave all options as it is and click on the Finish button. You should see the MySQL connect screen:

Step 20 – Provide your MySQL root username, password and click on the Check button. Once the connection is established, you should see the following screen:

Step 21 – Click on the Next button. You should see the following screen:

Step 22 – Click on the Execute button to apply all configuration, you should see the following screen:

Step 23 – Click on the Finish button to finish the product configuration. You should see the following screen:

Step 24 – Click on the Finish button to close the MySQL installation wizard.

After completing the MySQL server installation, proceed to the next step to verify the MySQL installation and interact with MySQL command line client.

MySQL CLI

At this point, a MySQL server has been installed on your server. Now, let’s open the command line interface and see how to interact with MySQL.

Click on the search in the taskbar, type MySQL, and open the MySQL command line client. You should see the MySQL client on the following screen:

Now, run the following command to verify the MySQL version:

				
					select version();
				
			

You will get the MySQL version in the following output:

				
					+-----------+
| version() |
+-----------+
| 8.0.27    |
+-----------+
1 row in set (0.00 sec)
				
			

Next, create a database called testdb using the following command:

				
					CREATE DATABASE testdb;
				
			

Please verify the created database using the command below:

				
					SHOW DATABASES;
				
			

You will get the following output:

				
					+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sakila             |
| sys                |
| testdb             |
| world              |
+--------------------+
				
			

Then create a user called testuser using the following command:

				
					CREATE USER 'testuser'@'localhost' IDENTIFIED BY 'password';
				
			

Next, grant all the privileges to the testdb using the following command:

				
					GRANT ALL ON testdb.* TO 'testuser'@'localhost';
				
			

Flush the privileges to apply all the changes:

				
					FLUSH PRIVILEGES;
				
			

To list the MySQL users, run the following command:

				
					SELECT USER from MySQL.user;
				
			

You will get the following output:

				
					+------------------+
| USER             |
+------------------+
| mysql.infoschema |
| mysql.session    |
| mysql.sys        |
| root             |
| testuser         |
+------------------+
				
			

Next, exit from the MySQL shell using the following command:

				
					EXIT;
				
			

Access MySQL Workbench

MySQL Workbench is a graphical tool to manage the MySQL database from the graphical interface. It is installed automatically with MySQL full package installation.

To access it, search for MySQL Workbench in the search bar and click on it. You should see the MySQL Workbench interface on the following screen:

Click on the Database menu, you should see the following screen:

Provide your database host, root username, and click on the OK button. You will be asked to provide a MySQL root password as shown below:

Provide a MySQL root password and click on the OK button. Once the connection is established, you should see the MySQL Instance in the following screen:

You can now create and manage MySQL database and users from the graphical interface.

How to Install MySQL Server on Windows Server 2019 Conclusion

In the above guide, you learned how to install MySQL server on Windows server 2019. You also learned how to interact with MySQL using MySQL command line client and MySQL Workbench. For more information, visit the MySQL documentation page.

Avatar for Hitesh Jethva
Hitesh Jethva

I am a fan of open source technology and have more than 10 years of experience working with Linux and Open Source technologies. I am one of the Linux technical writers for Cloud Infrastructure Services.

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x