App overview screenshotSQL and Database Guides
PostgresMySQLSQLite
Try our free SQL Client
Tools
Connecting to MySQL
Connecting to Drivers
Installing MySQL
Setting up MySQL
MySQL   >   
Installing MySQL   >   
MySQL on Windows

How To Install MySQL on Windows

MySQL is one of the most popular database systems available today. In this guide, we’ll walk you through how to install MySQL on Windows.

Download MySQL

You can find an installer for the latest MySQL version on the Oracle MySQL Community website. The page should automatically detect your operating system, but if not, select Microsoft Windows and click ‘Go to Download Page’

MySQL Windows Download Page

You can choose either option—the first (smaller) installer file downloads MySQL packages during installation. The second (larger) file includes all of the packages. We recommend you choose the first option.

Install MySQL

Once the file has downloaded, open it to begin installation. When prompted, choose a setup type. We recommend selecting ‘Custom’ and then specifying the packages you would like to install:

MySQL Windows installer settings

On the following screen, at minimum, select MySQL Server, MySQL Shell, and MySQL Documentation. You can also select any additional packages that you need.

When prompted, enter a root password for your MySQL server. You must note this password in order to make the initial connection:

MySQL Windows installer set root password

Connect to Your MySQL Database

At this point, if you left the ‘start MySQL Server after installation’ box checked, your MySQL server should already be running locally. If not, you can start it from the command line with this command:

"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld"

Now, let’s connect! Open Arctype, press ‘Add New Connection’, and enter your connection information. For now, we’ll use the root user with the password set during installation and the database mysql:

Arctype enter mysql connection credentials

Press Test Connection to confirm that all of your information is correct and then Save!

Setup Security for your New MySQL Database

Now that you have connected, you should make a few changes to improve the security of your database. The first is to create a new database that is separate from the mysql informational database you are currently connected to. Click ‘New Query’ and run the following command:

CREATE DATABASE myDB

Next, you should create a new user:

CREATE USER ‘myUser’@’localhost’ IDENTIFIED BY ‘myPassword’

And finally, you’ll need to grant this user full permissions on your database:

GRANT ALL PRIVILEGES ON myDB.* TO ‘myUser’@’localhost’

Run FLUSH PRIVILEGES to apply these permissions.

Go back to the settings menu in your SQL client and switch to this new user and database. You’re all ready to start writing queries!

Get help on databases and SQL. Join our Discord community.