MySQL has become a crucial part of my daily work. I use it to store my exploration database, power up this website and many more. Most of the time, I install MySQL Server on several Linux distributions. But today, I am going to install MySQL Community Server on Windows 10. Please note that this is not MariaDB version.
Steps to Install MySQL Community Server on Windows 10
Step 1. Download MySQL Community Server Installer for Windows
Before we install, you will need to download the MySQL Community Server installer for Windows. To do this, simply navigate to the following link and download the installer from there.
Next, double click the installer file and follow the on-screen installation wizard.
Step 2. MySQL installation
At this point, the installer will check for any Oracle products related to MySQL such as Workbench and ODBC connector.
On the window above, click Add to add a new MySQL server product.
Click MySQL Server 8.0 and then click the green arrow to the right as shown in the picture above. Click Next to continue
Now hit Execute to start the installation process.
Wait until the installation process completes.
Step 3. Configure MySQL Server
Click Next and we are going to configure our MySQL Server
Choose the high availability option. On this first step, you will need to choose between standalone MySQL Server or InnoDB cluster. The default is the Standalone MySQL Server.
Next, configure the config type and networking. You may choose from the config type how you will use MySQL. In this example, I choose the Development Computer and I leave the default value for the connectivity.
MySQL develops a new, better authentication system. But, personally, I have some compatibility issues with my old software when this feature is enabled. So, I choose the legacy authentication method.
Now we are going to manage the MySQL accounts and roles. First, create the MySQL root password. You can also add new MYSQL users on this step.
Next, we need to configure the MySQL service.
Finally, we are ready to execute the configuration wizard.
That’s it. In case you need to reconfigure your server, simply open the MySQL installer and then click the Configure button.
How to Connect to MySQL Server using MySQL Workbench
Open MySQL Workbench or you may want to install it using the MYSQL Installer and Add the Workbench product from there. Click the + button to set up a new connection.
Type the new connection name with something easy to remember for you and then enter the hostname, port (3306 is the default port). Click Test Connection to make sure you can connect to the server.
Once you connected to the MySQL Server, you can do many administrative tasks using the MySQL Workbench. You can create new users, add new databases, create queries, export and import data, and so on.
How to Enable Remote Access to the MySQL Server
Now we are going to enable remote access to the new MySQL Server installed in Windows PC. To do this, you can do either via MySQL console (command line) or use the MySQL Workbench.
Via MySQL Command Line Client
Open the MySQL Command Line Client from your application menu. Now create a new user or modify existing user to enable remote access
CREATE USER dhani@'%' IDENTIFIED BY '12345';
mysql> create user dhani@’%’ identified by ‘12345’; Query OK, 0 rows affected (0.04 sec)
And then grant some privileges to the new user
GRANT ALL PRIVILEGES ON *.* to dhani@'%';
Via MySQL Workbench
Open Workbench and go to the Administration tab. Click User and Privileges and then click Add Account. Enter the new user account details and press Apply
That’s it. I hope you enjoy the article of How to Install MySQL Community Server on Windows 10. See you on the next tutorial.