MySQL on Windows User Guide
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:
- An active AWS account
- An active subscription to the MySQL on Windows listing on AWS Marketplace
- An EC2 key pair for password decryption
- 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
- Navigate to the AWS Marketplace and search for "MySQL Windows cloudimg"
- Click Continue to Subscribe, accept the terms, then Continue to Configuration
- Select your preferred Region and Software Version
- Click Continue to Launch
- Choose Launch through EC2 for full control over instance configuration
- Select your instance type (
t3.mediumrecommended) - Configure storage: 30 GB gp3 minimum, increase for large databases
- 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.
- 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.
- Open the AWS Console and navigate to EC2 > Instances
- Select your instance
- Click Actions > Security > Get Windows password
- Click Browse and upload your EC2 key pair
.pemfile - Click Decrypt password
- 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:
- Local instance MySQL80 — connects as the
rootuser vialocalhost:3306 - Local instance MySQL80 - ad... — connects as the
adminuser via127.0.0.1:3306
To connect:
- Double click the MySQL Workbench shortcut on the Desktop
- Under MySQL Connections, select either the
rootoradminprofile - When prompted for a password, enter the corresponding value from
mysql-credentials.txt - 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:
- From the Start Menu, search for Services and click to open
- Locate the MySQL80 service in the list
- 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
- Verify the MySQL80 service is running in Windows Services
- Check your security group allows port 3306 from your IP
- Test local connectivity from MySQL Workbench
- Check Windows Firewall is not blocking port 3306
MySQL Workbench shows authentication error
- Verify the credentials from
mysql-credentials.txt - Check you are using the correct user (root vs admin)
- Ensure MySQL80 service is running
Forgot MySQL credentials
- Check the
mysql-credentials.txtfile on the Desktop - If the file has been deleted, reset the root password using MySQL safe mode
Cannot connect via RDP
- Verify the instance has passed 2/2 status checks
- Check that your security group allows port 3389 from your IP
- 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
mysqldumpor 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