Search code examples
google-cloud-platformgoogle-cloud-sql

Can I install MySQL on Google Cloud Compute Engine?


I created Instance of Compute Engine and Instance of SQL.

And I used the two services in conjunction.

However, the cost was higher than expected, so I stopped it.

If I install MySQL directly on Compute Engine, can I pay less than linking with SQL? Or will Google Cloud charge extra for SQL as usual?


Solution

  • You can install MySQL within a Compute Engine Instance. There is an extensive guide here on Google Cloud's docs.

    Cloud SQL is meant for escalability , ease of use and it has some features (High Availability, Import-Export, etc) that can make its use convenient, as you don't need to take care of the burden of updating, tweaking and maintaining the server hosting your MySQL load.

    In terms of pricing, a comparison between using Cloud SQL or hosting MySQL in a Compute Engine instance is strongly related to your use case and your application. Using a Computer Engine instance could in fact result cheaper, as you have more freedom of choosing a different cheaper machine type, but the underlaying main charges associated will Cloud SQL will be there (CPU, RAM, Disk Storage, Network Traffic). In terms of Compute Engine pricing there are no additional charges for hosting a MySQL database, as in general there are general purpose computers where you can host whatever you'd like.

    Finally, I will strongly advise you to use the Cloud Pricing Calculator to get a rough estimate and can stablish an objective comparison of what product can result cheaper for your use case.