Hello, how are you? Today we are going to talk about MySQL. This is a management system for rational databases. This database manager is multithreaded and multi-user, allowing it to be used by several people at the same time. In the same way, it can perform several queries at the same time, which makes it extremely versatile. Additionally, most of the code is written in C/C++ language and the syntax of its use is quite simple, which allows you to create simple or complex databases very easily. Besides, it is also multi-platform, which gives great flexibility to access databases from multiple devices. So in this post, let’s explain how to install MySQL in Windows 10.
In order to use MySQL correctly, you need to have Microsoft Visual C++ installed. With this intention, go to the following link, and select the executable corresponding to the processor architecture:
Once the download is finished, you only have to double-click on the file and install it normally. After this, we will be able to install MySQL in Windows 10.
Download MySQL for Windows.
The first thing we have to do is to download the MySQL installer for windows:
Wait while the file is downloading, and finally double-click on it to run it. Immediately the wizard will ask what type of installation you want to run. For the purposes of this tutorial please choose Custom installation:
In the next window choose the components to install:
- MySQL server
- Samples and Examples
On the next screen, press Execute to install the selected components. After installing all components, press Next to continue.
Next, the wizard offers the configuration of the installation according to the needs of the user. In other words, you can continue the installation for a stand-alone server or for a cluster. In this case, select the installation for a standalone server.
Now select the network type and characteristics. Set the configuration as Development Computer and leave the other options as they are.
In the next window choose the type of authentication you want to set. While the first option offers greater strength, I recommend that you use the legacy authentication method. Consequently, this will allow for greater flexibility of use:
In the next window set the password. It is highly recommended assigning a strong value, especially for the root user. In the same way, you can add as many users as you want.
Now you have the possibility to establish MySQL as a windows service for any user or a specific user. Besides, you can select that the server will start in conjunction with Windows.
In the next window press Execute to confirm the configuration:
Configure samples and examples
Now configure the samples and examples:
It then connects to the server. With this intention, enter the password we created earlier. If all goes well, then you will see a successful connection message highlighted in green.
Then check the configuration and press finish.
Next, we will see that the configuration of the features has been completed.
At the end of the installation and configuration, the wizard offers the option to launch the installed MySQL components. But for now, we’ll just finish the process.
Adding environment variable
To ensure the correct operation of MySQL from the command line, it is necessary to add the appropriate environment variable. This way we can launch MySQL from any Command Prompt. Otherwise, you would have to go manually to the installation address of the program. In addition, The variables you have to edit is the one corresponding to the Path value. With this in mind, add the following address: C:\Program Files\MySQL\MySQL Server 8.0\bin If you want to know how to edit environment variables, please check here.
Testing MySQL from Command Prompt.
Next, Let’s check that the variable has been added correctly. This way, we’ll launch any MySQL command. With this in mind, we have to do is open a CMD. In this case, press Win+R combination and type CMD
Now type the following command:
Connecting to MySQL command prompt mode.
What we are going to do is summon the root user, adding the corresponding password. With this intention, type the following command into the CMD:
mysql -u root-p
Now let’s show the databases present. Please note that even though we didn’t load any, we downloaded some samples at the beginning of the installation. With this in mind, you just have to run the following command:
Starting MySQL graphical mode.
To start MySQL graphically, just launch the Workbench. We do this by typing it in the Windows search engine:
Next, add the password to connect to the service:
The MySQL Workbench initial window will be launched immediately.
Finally, we have seen how to install MySQL in Windows 10. From now on you can take advantage of all the benefits of this powerful database. Likewise, following these steps, I have no doubt that you can install it and launch it without any problem. This is all for now, see you next time.