Lovelli has been writing for Blasting News for a little over a year now. She's adopted four kittens and dumped her Amazon bookstore.
Start with the community download
The first step in installing MySQL on your Windows 10 machine is to download the necessary installers. These files are made available from MySQL website; they are regularly updated, so you will find the newest versions. To learn more about databases and the basics of working with SQL databases, we only need a custom installation of just the MySQL server, and not the developer default.
These are the two installers you need for the custom installation:
- MySQL community server
- MySQL Workbench MSI installer
At the time of writing, the most recent community server for Windows is the MySQL Community Server 8.0.12. The most recent version is adequate to complete your installation, but the previous and archived versions can be accessed from their website too, should you ever need them.
Download the offline installer
Do a web search with the keywords "MySQL community server" or go to the download page for MySQL installer, and you will locate two downloadable installers. The first one is the web community file, and the second one is the offline installer file. You wouldn't normally need the MySQL Server online installer, so choose to download the second file, which is the “mysql-installer-community file”.
When you are faced with the options to choose to log in or to set up a new account, remember to hover over the last option and choose "No, thanks, just start my download." This would enable you to complete the installation without signing up to anything or logging into any new platform. The MySQL Installer will launch an easy-to-use, wizard-style guide to take you through the process step by step.
Choose a custom setup type
- Next, you must run the community installer file you have downloaded. You will find the .exe file listed in your Downloads folder. Double-click on the file and the wizard installation box will launch. All you need to do is follow the installation as you normally would any other software on Windows by allowing for the app to install software and to make changes on your PC.
- Just accept the License Agreement when presented with one, and then click Next. When it’s time to choose a setup type, select Custom, because we are just going to install what we need from the set of products: the MySQL Server.
NOTE: The next couple of screenshots are taken from an older custom installation. The version numbers may differ from your current installation, but the steps are principally the same.
- In the list of available products, you will then click on MySQL Servers > MySQL Server > MySQL Server 8.0.12. All the way down to the last item under MySQL Servers, which should be the version you want to install on your machine.
- The numbers after the dash will vary between X64 or X86. It automatically corresponds to whether or not you’re operating a 32-bit or a 64-bit Windows. The current MySQL installer will install for both 32-bit and 64-bit binaries.
- Add your MySQL server version to the list of products to be installed by clicking on the right arrow in-between the two boxes.
- Click Next, and then on the next Installation box, click Execute. The wizard will install your chosen product.
- When the installation is finished, the wizard will show a notification that the status is Complete, and all you need to do is click Next.
MySQL database server configuration
The installation comes with a setup wizard for the SQL Server. Although later on you can make changes to this configuration if you need to, it is better to get it right the first time.
Read More From Owlcation
- Make sure you select the Standalone MySQL Server / Classic MySQL Replication when prompted to make a choice.
- For the Server Configuration Type, you only need to select Development Computer or Development Machine (older versions still have this option) and then leave the default setting for Connectivity as is.
- By default the TCP/IP box is checked and the box below it that says "Open Firewall port for network access" is also checked to allow for other computers to connect to the port.
Set passwords and add user
During the installation, you will be asked to provide a root password and assign a user. Be sure to store your passwords in a safe place and do not lose them! You will use the root password for the default root account, which is a superuser account with all-access privileges.
- By default the password is empty. Once you assign a password to the root account, you will use it every time you access the Command Line for now.
- You can then add a MySQL User by clicking on the Add User tab. On the dialog box, all you need to do is assign a username and a password.
- The last step in the process is to execute the server configuration. Continue the installation and then click Execute to finish installing and configuring the server.
- Finally, launch the MySQL Command Line by typing "MySQL" in your search box. When you are asked to enter your password, type in the root account password you have set up during the configuration.
MySQL command line for Windows
The MySQL Command Line Client for Windows, along with a Unicode version, is now installed in your Windows computer. The command line is a text-based user interface that was primarily used before the mouse was popular. You can type in commands via the keyboard to interact with an operating system on a command line.
You can do many things with text-based commands. From resetting your root password, to assigning privileges, to adding a new user, and even creating databases. Not only that, you can already have fun manipulating data inside the tables and adding tables just by using some basic operations with the MySQL server. All you need is knowledge of SQL statement syntax to start working with databases.
To complete the MySQL installation, the next step is to install the MySQL Workbench, which is where you perform data modelling, SQL development, and all the system administration tasks to manage your data-driven applications. The following articles might be able to help you with that:
- Getting to Know the All-Time Favorite MySQL Open Source Database
- How to Install MySQL Workbench Using an MSI Installer on a Windows Machine
Secure your installation
These are some of the things to consider in order to secure your MySQL installation:
1. Update your version regularly Check out Oracle's webpage to find out if you've got the latest version or if you need to upgrade. You can upgrade your latest version using the MySQL Installer, which you download from the community downloads page, just like when installing:
- After the installation wizard runs, click on Catalog on the bottom right of the page.
- Let the installer check for upgrades, and then click Execute.
2. Use passwords and secure them. Your root password can be set and reset from the command line. Follow the strong password rule of at least 12 characters that do not form dictionary entry words, and add a mix of numbers, upper case, lower case, and special characters.
3. The root should not be a user of applications. Avoid running the MySQL database as a root user. Instead, assign privileges to a regular user and run as non-root user.
4. Create a test database. By creating a test database locally, you can develop in a “near real-world” scenario. Later on, remove the test database and clean up. It’s also a good idea to delete the sample databases, along with any anonymous users that are created when MySQL is installed.
This content is accurate and true to the best of the author’s knowledge and is not meant to substitute for formal and individualized advice from a qualified professional.
© 2018 Lovelli Fuad
tmaster on July 31, 2019:
problem is the server is not included in the download .
The packages included in the current bundle that match the following were not found:
* The selected setup type: Server only
* The operating system architecture: 32-bit
* The MySQL Installer license type: Community
Lovelli Fuad (author) from Southeast Asia and the Pacific on November 23, 2018:
Okay, here is what I would do:
1 - Install the server version 8.0.12 as detailed in the article, refer to the video for custom installation.
2 - Set up passwords and make sure I can get into the command line client.
3 - Later, after I'm positive that the server is ready for me, I would try to upgrade to 8.0.13 from the command line.
It could be that there is a bug; people find bugs all the time. The version 8 is brand new, and so if there was indeed a bug, fixes are on the work.
If you need to check for that bug or would like to report a bug, do so from the MySQL bug database here: https://bugs.mysql.com/.
Thanks for your comments!
Benson Ongoma Asumwa on November 21, 2018:
Thanks a lot for your directions.
I did the installation for version 5.7.23 and it was okay. My problem is with "mysql-installer-community-18.104.22.168.msi" - the newest version. The installation starts okay, but does not show "Mysql servers" in the Available Products" Tab. So the server is never installed. It seems I cant get through after different attempts.
Could there be a bug related to that version that I would need to be aware of? I cannot seem to get anything in my search for a solution.
Thanks for your time.
Lovelli Fuad (author) from Southeast Asia and the Pacific on November 20, 2018:
That's quite common. When I first tried to install MySQL server a couple of years ago, I didn't even find the "No, thanks just start my download" option from the MySQL download page. (I actually created an Oracle account and logged in before attempting to download.)
If you follow the steps detailed above, you should be okay. Go back to the previous step and make sure that you have selected "Custom" setup. By default, MySQL will try to install the Full version.
Here are some videos, where you can see the installation in action:
- Developer default Windows 10 https://youtu.be/WuBcTJnIuzo
- Custom https://youtu.be/fwQyZz6cNGU
My advice is be patient and if it doesn't feel right, go a step back and redo that step until it looks right.
Go ahead and check out the videos, thank you and bye!
Benson Ongoma Asumwa on November 20, 2018:
Hello there - Thanks for the informative article. I followed the procedure as outiled here. However I don't have the "Mysql servers" option on the Available Products tab. I tried on Windows 7 Homebasic and Windows 10 pcs but that option is just not available.
I only have Applications, Connectors and documentation. Anything I am missing?