Skip to content
Follow
CMS Ubuntu Linux

How to Install MySQL or MariaDB on Google Cloud Server

Richard
Written by
Richard
Nov 27, 2021 Updated Jun 20, 2026 3 min read
How to Change Default Apps in Ubuntu
How to Change Default Apps in Ubuntu

You install MySQL or MariaDB on your Google Cloud server running Ubuntu Linux to create a robust database for your website.

MySQL and MariaDB are popular open-source relational database management systems (RDBMS) that store your website’s dynamic content. Many content management systems, like WordPress, rely on these databases to function.

This process is essential for anyone looking to host dynamic web applications on Google Cloud, ensuring you have a secure and efficient way to manage your data. For example, MariaDB is a community-developed fork of MySQL, offering drop-in compatibility.

⚡ Quick Answer

Install MySQL or MariaDB on your Ubuntu Google Cloud server by connecting via SSH and using apt-get commands. Update package lists with sudo apt-get update, then install your chosen database with sudo apt-get install mysql-server or sudo apt-get install mariadb-server.

How to connect to the Google Cloud server

Connecting to your Google Cloud server is easy using the SSH tool built right into your browser via the Google Cloud Console.

SSH from the browser supports the following:

  • Web browsers
    • The latest version of Google Chrome
    • Firefox
    • Microsoft Edge
    • Microsoft Internet Explorer 11 and later
    • Safari 8 and later. Note that Safari is not supported in private browser mode.
  • Virtual machine configurations
    • All Linux VM images are natively available in Google Cloud.

No additional software or browser extensions are needed. Log in to the Google Cloud Console and navigate to Menu > Compute Engine > VM instances.

In the list of virtual machine instances, click SSH in the row of the instance that you want to connect to.

Establishing an SSH connection to a Google Cloud VM instance
establish ssh connection to vm instances

Alternatively, you can open an SSH connection to an instance by clicking its name and SSH from the instance details page.

An SSH terminal window with the Ubuntu Linux instance created in the series’s second post will open.

You should now be able to run commands in Ubuntu Linux created on the Google Cloud server.

Terminal window connecting to a Google Cloud server host instance
connect to google cloud instance host

How to install a database server on Google Cloud Servers

Installing a database server, such as MySQL or MariaDB, on your Google Cloud server is simple using Ubuntu’s package manager.

How to install MySQL or MariaDB on Ubuntu Linux

You can store content within a database with a database server installed and your domain name pointing to your Google Cloud server.

We’re now far ahead in creating a website online using a web server, PHP server-side language, and a database server. We’re ready to tie all these servers and software together for your website to be prepared.

We’re now ready to configure our servers and packages to get the website going.

Please stay tuned and continue reading up on our previous posts.

Conclusion:

To wrap up, setting up a MySQL or MariaDB database on your Google Cloud Ubuntu server is a key step in building your website. Following the steps outlined in this guide, you can efficiently manage your database needs and ensure your content is stored securely. Here are the key takeaways:

  • Establishing a web and database server is essential for running dynamic websites and CMS platforms.
  • Google Cloud offers user-friendly SSH access to connect to your virtual machines.
  • MySQL or MariaDB can be installed easily using Ubuntu’s default repositories and apt-get commands.
  • Each step in this series builds on the previous one, culminating in a fully operational website.

Stay tuned for our next post, where we will delve deeper into configuring your servers and finalizing your website setup!

Was this guide helpful?

Was this helpful?
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

📚 Related Tutorials

How to Install Additional Software on Ubuntu
Ubuntu Linux How to Install Additional Software on Ubuntu
How to Enable Copilot Microsoft Edge Access
Windows How to Enable Copilot Microsoft Edge Access
How to Setup WordPress with Nginx and Cloudflare on Ubuntu
CMS How to Setup WordPress with Nginx and Cloudflare on Ubuntu
How to Install Drupal with Nginx and Cloudflare on Ubuntu
CMS How to Install Drupal with Nginx and Cloudflare on Ubuntu

No comments yet — be the first to share your thoughts!

Leave a Comment

Your email address will not be published. Required fields are marked *