How to Install MySQL on Windows 11
A complete step-by-step guide to install MySQL Server on your Windows 11 computer.
MySQL is one of the most versatile and go-to solutions when it comes to dealing with databases. You could either be an undergrad wanting to install it for a semester project, or you could be a team of database engineers working to build a data-driver B2B service; MySQL will work flawlessly for either of the needs.
If you have been working on a project that requires you to store and manipulate data, MySQL is among one of the most capable database systems to help you out.
However, in order for MySQL to work on your system, you would need the Microsoft Visual C++ 2019 Redistributable Package installed on your system. So before jumping to MySQL, let’s start with the Microsoft Visual Redistributable Package.
Download and Install Microsoft Visual Redistributable Package
You can easily download and install the Microsoft Visual Redistributable Package from the official Microsoft Technical Documentation website with just a single click.
To do so, head to the docs.microsoft.com/latest-supported-vc-redist using your preferred browser. Then, scroll down on the webpage to locate the download links and click on the link suitable for your device architecture to download it.
Once downloaded, head to your default downloads directory and double-click on the
.EXE file to run the installer on your system.
Then, from the Visual installer window, click on the checkbox preceding the ‘I agree to terms and conditions’ label and click on the ‘Install’ button.
After that, a UAC (User Account Control) windowpane will appear. If you are not logged in with an admin account, enter the credentials for one. Otherwise, click on the ‘Yes’ button to commence the installation.
It might take a few minutes to install on your system. Once installed, you will be notified of the successful install of the package on the Visual installer window. Click on the ‘Close’ button to exit the window.
Now that you have the Visual C++ Redistributable package, let’s head on to installing MySQL on your system.
Download and Install MySQL on your PC
The simplest and recommended way to download to install MySQL on your Windows 11 PC is by using the official MySQL installer. However, you will still need to download it first.
To download MySQL, head to its official download page mysql.com/downloads using your preferred browser. Then, scroll down on the webpage and click on the ‘MySQL Community(GPL) Downloads’ button’ to proceed.
Then, from the ‘Community Downloads’ page, click on the ‘MySQL Community Server’ option to continue.
After that, click on the ‘Go to Download Page’ button present under the ‘Recommended Download:’ section on the webpage.
Next, click on the ‘Download’ button present on the larger file size tile to initiate the installer download.
Now, from the next webpage, click on the ‘No thanks, just start my download.’ to continue.
Once downloaded, head to your default downloads directory and double-click on the
.MSI file you just downloaded.
It will take a few minutes for Windows to configure the installer; wait patiently while it does that.
After that, a UAC (User Account Control) screen will appear on your screen. If you are not logged in with an admin account, enter credentials for one. Otherwise, click on the ‘Yes’ button to continue.
Now, from the MySQL installer window, you will need to select a setup type to install. For your better understanding, below is a gist provided for each of them:
Developer Default: This setup type installs the MySQL server and various tools required for MySQL application development. Namely, the setup includes MySQL Shell, MySQL Router, MySQL Workbench, MySQL for Visual Studio, MySQL Connectors, and MySQL Server.
Sever Only: Choosing this setup type will only install MySQL Server. The perfect use case for this will be when you wish to deploy a MySQL server but not develop MySQL apps.
Client Only: This setup type installs all the tools included in the ‘Developer Default’ setup type with a single exception of MySQL Server. You can choose this option if you wish to develop an app for an existing server.
Full: As the name suggests, this type includes all of the MySQL products along with the samples, examples, and documentation of the tools.
Custom: By selecting this type you can manually select all the tools, their specific versions, and even architecture (depending on OS).
Select the setup type by clicking on the radio button preceding the option. Then click on the ‘Next’ button present at the bottom right corner of the window to proceed.
After that, on the next screen, click on the ‘Execute’ button to start the installation of all mentioned tools.
Once all the tools are successfully installed, click on the ‘Next’ button to proceed.
After that, you will be required to configure the server type on your computer. There are three types of Server Config Types you can choose:
Development Computer: If you run several servers and applications on the machine, this is the most suitable option for you as MySQL will use the least possible memory in this config.
Server Computer: The best case to choose this type is when you are running a few other server applications along with MySQL. The memory usage will be moderate.
Dedicated Computer: If you are not going to run any other servers on the machine, choose this option. MySQL will maximum available memory.
On the ‘Type and Networking’ screen, click on the drop-down menu following the ‘Config type’ option and click to choose your preferred option. You can also configure the TCP/IP ports according to your preference to make the connection with SQL. In case you are not sure, it is best to leave it at its default settings. Click on the ‘Next’ button to proceed.
On the ‘Authentication Method’ screen, choose the ‘Use Strong Password Encryption for Authentication’ option if you are creating a new server from scratch. Otherwise, if you already have applications that cannot use the SQL 8 connectors and drivers or, recompilation of existing app is not feasible, choose the ‘Use Legacy Authentication Method’ by clicking on the radio button preceding each option.
After that, on the ‘Account and Roles’ screen, you will need to create a password for the root account by entering your preferred password in the respective fields. You can also create User Accounts at this stage, click on the ‘Add User’ button to do so.
If you chose to create User Accounts, enter the name of the user in the text box following the ‘Username:’ field. Then, select the role for the user using the drop-down menu present right beside the ‘Role:’ option. Then, enter the password for the said user and click on the ‘OK’ button to set the credentials and create the user.
In case you have not chosen to create a user as of now, click on the ‘Next’ button to proceed.
Then, on the ‘Windows Service’ screen, default options will be already selected to run the SQL Server as a Windows Service which is suitable for most of the scenarios. If you do not wish to run it as a Windows Service, click on the checkbox preceding the ‘Configure MySQL Server as a Windows Service’ to uncheck and configure it yourself at a later stage.
In case you chose to go with the default option, you can also name this particular Server instance by entering an appropriate name in the text box present right next to the ‘Windows Service Name’. To start the SQL Server at system startup, click on the checkbox preceding the ‘Start the MySQL Server at System Startup’. Then, click on the ‘Next’ button to proceed.
On the next screen, click on the ‘Execute’ button to apply the configuration settings.
After that, you will be prompted for a router configuration that can bootstrap an already installed MySQL Router (which is installed in Developer Default and Full setup type) to direct traffic between MySQL apps and an InnoDB cluster. If and when configured, the MySQL Router runs as a Windows service.
In case you do not wish to use the MySQL Router on your system, click on the ‘Finish’ button to continue. Otherwise, click on the checkbox preceding the ‘Bootstrap MySQL Router for use with InnoDB cluster’ option and configure it as per your requirements.
On the next screen, click on the ‘Next’ button to proceed.
Then, on the ‘Connect to Server’ screen, enter the password in the text box following the ‘Password:’ field you set at the time of server configuration and click on the ‘Check’ button to check the connection.
Once the connection to the server succeeds, click on the ‘Next’ button to proceed.
Then, on the ‘Apply Configuration’ screen, click on the ‘Execute’ button.
After the configuration has been applied, click on the ‘Finish’ button to proceed.
After that, on the ‘Product Configuration’ screen, click on the ‘Next’ button to continue.
The installation of MySQL is now complete, you can click on the hyperlinks present on the screen to refer to the documentation and examples on MySQL Shell. Otherwise, click on the ‘Finish’ button’ to close the window.