MySQL on Compute Engine


MySQL is one of the most popular open source relational databases, offeringrobust transaction processing at low costs. For a general overview of MySQL, seeWhat is MySQL.

There are several ways that you can deploy MySQL as part of yourGoogle Cloud project:

  • Cloud SQL offers MySQL as a web service. You can use Cloud SQLto host your MySQL database in Google's cloud, and let Google Cloud handleadministrative duties like replication, patch management, and databasemanagement. For an overview, seeCloud SQL overview.
  • Google Cloud Marketplace lets you click to install MySQL onto aCompute Engine instance. To browse available MySQL installationoptions from Cloud Marketplace in the Google Cloud console:

    Go to Cloud Marketplace

  • You canmanually install and customize MySQL on Compute Engine. Formanual installation instructions, seeInstall MySQL on Compute Engine. To optimize your configuration ofMySQL, follow the guide atConfigure MySQL on Compute Engine.

Choose the best MySQL deployment option for your needs

To understand which MySQL deployment option best fits your needs, consider theoptions as follows:

Try Cloud SQL (recommended)

If you want the convenience of having Google Cloud take care of thebackend database and server administration chores, we recommend that you useCloud SQL.Cloud SQL provides the following advantages:

  • Automated backups
  • Point-in-time recovery
  • Replication of your data across multiplezones for greater availability andresiliency.

If you require MySQL features that Cloud SQL doesn't support, such asuser defined functions or the SUPER privilege, you can explore the options thatfollow. For more information about the features that Cloud SQLsupports, see theCloud SQL FAQ.

Explore Google Cloud Marketplace deployment options

Cloud Marketplace offers several options for MySQL installations,including:

  • A standalone MySQL installation
  • LAMP stacks
  • LEMP stacks
  • Nginx stacks
  • A Percona MySQL Cluster installation

Browse available MySQL installation options from Cloud Marketplace inthe Google Cloud console:

Go to Google Cloud Marketplace

Manually install MySQL

If the previous options don't fit your requirements, such as if you want todeploy MySQL on a custom image you created, or if you want complete control ofthe installation process, you can manually install MySQL by creating aCompute Engine instance and installing MySQL directly onto it. For moredetailed instructions, seeInstall MySQL on Compute Engine.

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-18 UTC.