Databases

MySQL on Windows User Guide

| Product: MySQL on Windows

Overview

This guide covers the deployment and configuration of MySQL on Windows Server using cloudimg AMIs from the AWS Marketplace. MySQL is the world's most popular open source relational database, known for its reliability, performance, and ease of use.

What's included in this AMI:

  • MySQL (latest version) with database listener on port 3306
  • MySQL80 Windows Service for automatic startup on boot
  • MySQL Workbench preinstalled with preconfigured connection profiles
  • Randomly generated database credentials stored on the desktop
  • Windows Server with Remote Desktop access
  • 24/7 cloudimg support with guaranteed 24 hour response SLA

Prerequisites

Before launching this AMI, ensure you have:

  1. An active AWS account
  2. An active subscription to the MySQL on Windows listing on AWS Marketplace
  3. An EC2 key pair for password decryption
  4. A Remote Desktop client application

Recommended Instance Type: t3.medium (2 vCPU, 4 GB RAM) or larger. The minimum requirements are 1 vCPU, 1 GB RAM, and 30 GB disk space.

Step 1: Launch the AMI

  1. Navigate to the AWS Marketplace and search for "MySQL Windows cloudimg"
  2. Click Continue to Subscribe, accept the terms, then Continue to Configuration
  3. Select your preferred Region and Software Version
  4. Click Continue to Launch
  5. Choose Launch through EC2 for full control over instance configuration
  6. Select your instance type (t3.medium recommended)
  7. Configure storage: 30 GB gp3 minimum, increase for large databases
  8. Configure your Security Group with the following inbound rules:
Port Protocol Source Purpose
3389 TCP Your IP Remote Desktop (RDP) access
3306 TCP Your IP MySQL database listener port

Important: Restrict port 3306 to trusted application servers or your IP only.

  1. Select your EC2 key pair and launch the instance

Step 2: Retrieve the Windows Password

Wait for the EC2 instance to pass 2/2 status checks.

  1. Open the AWS Console and navigate to EC2 > Instances
  2. Select your instance
  3. Click Actions > Security > Get Windows password
  4. Click Browse and upload your EC2 key pair .pem file
  5. Click Decrypt password
  6. Note the Username (Administrator) and the decrypted Password

Step 3: Connect via Remote Desktop

Open your Remote Desktop client:

On Windows: 1. Press Win + R, type mstsc, and press Enter 2. Enter the public IP address of your instance 3. Click Connect

On macOS: 1. Open Microsoft Remote Desktop 2. Click Add PC and enter the public IP address 3. Double click the connection to connect

When prompted: - Username: Administrator - Password: The decrypted value from Step 2

Step 4: Retrieve MySQL Credentials

The MySQL database credentials have been randomly generated and stored on the Desktop. Locate and open the file:

C:\Users\Administrator\Desktop\mysql-credentials.txt

This file contains the passwords for both the root user and the admin user.

Step 5: Connect Using MySQL Workbench

MySQL Workbench has been preinstalled with two preconfigured connection profiles:

  1. Local instance MySQL80 — connects as the root user via localhost:3306
  2. Local instance MySQL80 - ad... — connects as the admin user via 127.0.0.1:3306

To connect:

  1. Double click the MySQL Workbench shortcut on the Desktop
  2. Under MySQL Connections, select either the root or admin profile
  3. When prompted for a password, enter the corresponding value from mysql-credentials.txt
  4. Click OK

You will see the MySQL Workbench interface with the management panel on the left, query editor in the center, and connection details on the right.

Managing the MySQL Service

MySQL runs as a Windows Service named MySQL80 and starts automatically on boot.

To manage via Windows Services:

  1. From the Start Menu, search for Services and click to open
  2. Locate the MySQL80 service in the list
  3. Right click to Start, Stop, or Restart the service

Using PowerShell:

# Check MySQL service status
Get-Service -Name MySQL80

# Stop MySQL
Stop-Service -Name MySQL80

# Start MySQL
Start-Service -Name MySQL80

# Restart MySQL
Restart-Service -Name MySQL80

Server Components

Component Version
MySQL Latest (MySQL 8.0)
MySQL Workbench Included

Filesystem Layout

Drive Description
C:\ System drive with Windows, MySQL, and MySQL Workbench

Key directories:

Directory Purpose
C:\Program Files\MySQL\MySQL Server 8.0 MySQL server installation
C:\Program Files\MySQL\MySQL Server 8.0\data Database data files
C:\Program Files\MySQL\MySQL Workbench Workbench installation
C:\Users\Administrator\Desktop\mysql-credentials.txt Database credentials

Troubleshooting

Cannot connect to MySQL on port 3306

  1. Verify the MySQL80 service is running in Windows Services
  2. Check your security group allows port 3306 from your IP
  3. Test local connectivity from MySQL Workbench
  4. Check Windows Firewall is not blocking port 3306

MySQL Workbench shows authentication error

  1. Verify the credentials from mysql-credentials.txt
  2. Check you are using the correct user (root vs admin)
  3. Ensure MySQL80 service is running

Forgot MySQL credentials

  1. Check the mysql-credentials.txt file on the Desktop
  2. If the file has been deleted, reset the root password using MySQL safe mode

Cannot connect via RDP

  1. Verify the instance has passed 2/2 status checks
  2. Check that your security group allows port 3389 from your IP
  3. Wait up to 15 minutes for the Windows password to be available

Security Recommendations

  • Change default passwords after first login for both root and admin users
  • Change the Administrator password for Windows after first login
  • Delete the credentials file from the Desktop after noting the values
  • Restrict port access: Only allow port 3306 from trusted IPs
  • Create application specific users with minimal privileges
  • Disable remote root login unless specifically required
  • Enable SSL/TLS for encrypted database connections
  • Back up regularly: Use mysqldump or MySQL Enterprise Backup
  • Enable Windows Update: Keep the OS patched with the latest security updates

Support

If you encounter any issues with this product, contact cloudimg support:

  • Email: support@cloudimg.co.uk
  • Website: www.cloudimg.co.uk
  • Support hours: 24/7 with guaranteed 24 hour response SLA