How to Install and Configure Just the MySQL Server With Custom Setup on Windows
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.
- 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:
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.
Questions & Answers
© 2018 Lovelli Fuad