All Products
Search
Document Center

Elastic Compute Service:Deploy MySQL database on Windows

Last Updated:Jun 20, 2026

MySQL is an open-source relational database management system that supports the SQL language and is suitable for a wide range of applications. This topic describes how to manually deploy a MySQL database on an ECS instance that runs Windows.

Prerequisites

  • A public IP address is automatically assigned to the ECS instance. Alternatively, an elastic IP address (EIP) is associated with the ECS instance. For instructions on how to enable public bandwidth, see Enable public bandwidth.

  • The security group of the ECS instance has an inbound rule that allows traffic on port 3389. For more information, see Add a security group rule.

Procedure

Note

This topic uses Windows Server 2025 and MySQL 8.0 as an example.

  1. Connect to the ECS instance. For more information, see Connect to a Windows instance by using Workbench.

  2. Go to the official MySQL website to download the MySQL Installer. Select the full offline installer mysql-installer-community-8.0.42.0.msi (353.7M) and click Download.

  3. Open the installer, select Server only, and then click Next.

  4. On the Check Requirements page, click Execute. The wizard checks for required dependencies, such as the Microsoft Visual C++ 2019 Redistributable package. If any are missing, follow the prompts to install them. When the check is complete, click Next.

  5. On the Installation page, click Execute to install MySQL Server. When the installation is complete, click Next.

  6. Click Next to start the setup wizard.

  7. Click Next on the following pages, accepting the default settings, until you reach the Accounts and Roles page. Set the password for the root user in the MySQL Root Password and Repeat Password fields. To add more database users, click Add User in the MySQL User Accounts section.

  8. Click Next until you reach the Apply Configuration page. Click Execute to apply the configuration. When the process is complete, click Finish.

  9. Click Next, and then click Finish to complete the installation.

  10. In the Start menu, search for mysql. Open the MySQL command-line client and verify that you can connect to the database.

References

  • For a more convenient way to manage your databases with a highly available, reliable, secure, and scalable managed service, consider using ApsaraDB RDS. ApsaraDB RDS is a stable relational database management system from Alibaba Cloud that supports the MySQL, SQL Server, PostgreSQL, and MariaDB engines. It provides a comprehensive solution for disaster recovery, backup, restoration, and migration. For more information, see What is ApsaraDB RDS?.

  • You can use Data Transmission Service (DTS) to migrate your self-managed database to Alibaba Cloud with minimal downtime. For more information, see Migration solutions overview and Migrate data from a self-managed MySQL database to an ApsaraDB RDS for MySQL instance.