MySQL is an open-source database management system developed by oracle corporation for Linux, Windows, macOS. MySQL comes with pre-compiled binaries for Windows, which makes it easy to install MySQL on Windows 10.
In this guide, we will walk you through how to download and install MySQL on Windows 10.
Download MySQL for Windows 10
To get started with the MySQL server on Windows 10, first, you need to download the latest MySQL Community Server from the MySQL website. To download the latest version follow this link – https://dev.mysql.com/downloads/mysql/
This URL will take you to the MySQL official website. To download MySQL for Windows, first, select the operating system (Microsoft Windows), then click the “Go to Download Page.”
This will take you to the next download page, where you get two different MSI installers under the General Availability (GA) Releases. One is a web-community installer, and the other one is a community installer.
You have to download the second one, which is the community installer; click the download button to start downloading. You will be asked to either log in or Sign up using an oracle web account. If you wish to log in or Sign up, you can; if not, click the “No thanks, just start my download.”
Once the downloading is finished, we’re ready to install the MySQL server on Windows 10.
Install MySQL on Windows 10
Follow the steps to properly install the MySQL community server on Windows 10.
- Right-click the MySQL-community installer, then click the install.
- Wait for a while until Windows is configuring the MySQL installer.
- Next, click the “YES” when the User Account Control window popups.
- You will be asked to choose a setup type. You get five different setup types, including Developer default, Server only, Client only, Full, and Custom for MySQL installation. Select any setup mode that you need.
- Now, I am selecting Server only mode because I want to use it as a server only.
- Then, click the Next.
- On the installation page, you get a list of the products that will be installed. Click the Next to continue.
- Click the Execute button to start the installation.
- Once the installation is finished, click the Next to configure the product.
- Now configure the following settings.
Type and Networking
Select config type as a Development computer. Under the connectivity, you can manage the TCP port range. If you wish to change the port range, then you can. Then, click the Next.
Select the authentication method, then click Next. You get two types of authentication methods; you should go with the recommended method. Click the Next to continue.
Accounts and Rules
Enter the MySQL root user password, then click the Next button.
If you want to add a new user, then click Add Users. To set up a new user, Enter the username, select host as localhost, select User Role, and Enter the password, then click the OK.
Enter the Windows service name whatever name you want, then click Next.
Click the Execute button to apply the configuration.
Once everything is finished, click the Finish button to complete the setup.
Now MySQL server is ready to use on Windows 10.
Related article: How to Install Nginx on Windows
How to manage MySQL server on Windows
You can use the command prompt to manage the MySQL server. To log in to the MySQL server, open the command prompt and type the command “mysql -u root -p”, then enter the root user password. Once you successfully authenticated, you will be logged in MySQL server.
If you get the error message “MySQL is not recognized as the internal or external command” in the command prompt. Now, you need to update the MySQL path into the environment variables.
Here’s how to do this.
- Open the File Explorer.
- Navigate to the C:/Program Files/MySQL/MySQL Server.
- Hold down the shift key and then right-click the bin folder, then select copy as a path.
- Now open the Windows 10 settings, and then select System > About.
- Under the related settings, click the Advanced system settings.
- This opens the system properties window.
- On the Advanced tab, click the Environment variables…
- This will open a new Environment Variables window.
- Under the user variables section, select the variable Path, and then click the Edit button.
- Click the New, and then paste the path of the bin folder you copied, then click the OK.
Now you will be able to use mysql commands directly in the command prompt.