MySQL Installation on Windows Server 2012

Introduction

MySQL is a widely used open-source relational database management system (RDBMS) used to store, manage, and retrieve application data.

This document provides a step-by-step procedure for installing MySQL on Windows Server 2012 using the Microsoft Web Platform Installer (Web PI).

Note: MySQL 5.1 is an old and unsupported version. It may be used only for legacy applications that specifically require it. For production environments, use a currently supported MySQL version that is compatible with the application and operating system.

Prerequisites

Before starting the installation, ensure the following requirements are met:

Server Requirements
  • Windows Server 2012 is installed and running.
  • Administrator access is available.
  • The server has sufficient disk space.
  • The server has network/internet access if downloading MySQL through Web PI.
  • Windows Firewall is configured according to the application requirements.
Software Requirements
  • Microsoft Web Platform Installer (Web PI).
  • MySQL package compatible with Windows Server 2012.
  • Application requirements/documentation, if MySQL is being installed for a specific application.
Information Required

Keep the following information ready:

  • MySQL root password.
  • MySQL installation directory.
  • Required MySQL port, normally 3306.
  • Application database name, username, and password if the database will be used by an application.

Implementation

Step 1: Launch Web Platform Installer

Download and launch the Web Platform Installer (Web PI) by running:

wpilauncher.exe

Run the installer with administrative privileges if required.


Step 2: Search for MySQL

Once Web PI is opened:

  1. Click the Search option.
  2. Search for:
MySQL
  1. Review the available MySQL packages.

Step 3: Select MySQL

Select the MySQL version compatible with the server and application.

For legacy environments, the original procedure may use:

MySQL Windows 5.1

Click:

Add → Install

to start the installation.


Step 4: Configure the Root Password

During installation, you will be prompted to configure the MySQL root account.

Enter a strong password.

Example:

Username: root
Password:

Important: Store the root password securely. Do not share it through email, chat, or documentation.


Step 5: Accept the License Agreement

Review the MySQL licensing agreement.

Click:

I Accept

The installer will then download and install the selected MySQL package.


Step 6: Complete the Installation

Wait for the installation to complete.

Once the installation has finished, click:

Finish

MySQL should now be installed on the Windows Server.


Verify MySQL Installation

After installation, open Command Prompt as Administrator.

Navigate to the MySQL bin directory.

For MySQL 5.1, the default location may be:

cd "C:\Program Files\MySQL\MySQL Server 5.1\bin"

Check the installed version:

mysql --version

Example:

mysql  Ver 14.14 Distrib 5.1.xx, for Win64

Connect to MySQL

Use the following command:

mysql -u root -p

Enter the root password when prompted.

If the login is successful, you should see:

mysql>

Run:

SELECT VERSION();

This confirms the MySQL server version.

Exit MySQL using:

exit;

Check MySQL Service

MySQL normally runs as a Windows service.

Open:

services.msc

Look for a service such as:

MySQL

or:

MySQL51

Verify that the service status is:

Running

You can also check from Command Prompt:

sc query MySQL

If the service name is different, use the actual MySQL service name.


Check MySQL Port

The default MySQL port is:

3306

You can check whether the port is listening:

netstat -ano | findstr :3306

If MySQL is listening, you should see a LISTENING entry.


Firewall Configuration

If remote applications or servers need to connect to MySQL, TCP port 3306 may need to be allowed through Windows Firewall.

However, do not expose MySQL directly to the public internet unless there is a specific requirement and appropriate security controls are in place.

Prefer restricting access to trusted application/server IP addresses.


Post-Installation Checks

After installation, verify:

  • MySQL service is running.
  • Root login works.
  • MySQL version is correct.
  • Port 3306 is listening if required.
  • Application connectivity works.
  • Database and user permissions are configured.
  • Windows Firewall rules are correctly configured.
  • MySQL error logs do not contain installation/startup errors.

Conclusion

MySQL can be installed on Windows Server 2012 using a compatible installation package and configured as a Windows service.

After installation, the administrator should verify the MySQL service, root login, database connectivity, and required network access.

For legacy applications, older MySQL versions may be required for compatibility. However, MySQL 5.1 and 5.5 are obsolete and should not be selected for new deployments. Where possible, upgrade the operating system and application and use a currently supported MySQL release.


FAQs

Q1. What is the default MySQL port?

The default MySQL port is:

3306

Q2. What is the default MySQL administrator account?

The default administrative account is:

root

Q3. How can I check the installed MySQL version?

Run:

mysql --version

Or after logging into MySQL:

SELECT VERSION();

Q4. How do I connect to MySQL from Command Prompt?

Use:

mysql -u root -p

Then enter the root password.


Q5. How can I check whether MySQL is running?

Open:

services.msc

and check the MySQL service.

Alternatively:

sc query MySQL

Q6. Where is MySQL installed?

For the older MySQL 5.1 installation described above, the default directory is typically:

C:\Program Files\MySQL\MySQL Server 5.1\

The executable files are located under:

C:\Program Files\MySQL\MySQL Server 5.1\bin

Q7. How do I start MySQL manually?

If the MySQL service is configured, it is preferable to start it through Windows Services.

For example:

net start MySQL

The exact service name may vary.


Q8. How do I stop MySQL?
net stop MySQL

How To Move a MySQL Data Directory to a New Location on Ubuntu 20.04? – Pheonix Solutions

How to Change MySQL User Authentication Plugin for Password? – Pheonix Solutions

Talk to our experts:

Looking for the right technology solution for your business?. Our experts can help with web hosting, domain registration, DevOps and cloud, software development, web applications, mobile applications, and enterprise solutions. Get in touch with our team here.

admin

Writes about Cloud & AWS at Pheonix Solutions.

Leave a Reply

Scroll to Top