MySQL and MariaDB are the most popular open-source database servers in use today and run on the majority of websites online. This is the sixth post in this series which can be used as a beginner’s guide to learn how to create a website domain, set up a Google Cloud server with Ubuntu Linux, and install software and packages to build and run a website online. In this series:
How to create a website domain How to set up a Google Cloud server with Ubuntu Linux How to install Apache on a Google Cloud server (alternative to Nginx) How to install Nginx on a Google Cloud server (alternative to Apache) How to install PHP on a Google Cloud server
Now that you’ve learned how to create a website domain and set up a Google Cloud server, this post shows you how to install MySQL or MariaDB on Google Cloud servers with Ubuntu Linux. A web server allows content to be published and served to web clients and your audience browsing your website. A database server allows you to store your website content efficiently. If you’re going to be running a popular content management system (CMS), then a database server is certainly required. In our first post, we mentioned that after you create a domain name, it can’t be used until forwarded or pointed to a server. In the second post, we showed you how to point a domain to a server we created. At this point, we’re ready to connect to our Google Cloud server and begin installing software and additional packages that will be used to run a website online.
How to connect to the Google Cloud server
Google Cloud server (Compute Engine) allows users to connect using SSH from the browser window to their virtual machine (VM) instance from within 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 in private browser mode is not supported. Virtual machine configurations All Linux VM images are natively available in Google Cloud.
No additional software or browser extensions are needed. Simply login to Google Cloud Console, and go 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. Alternatively, you can open an SSH connection to an instance by clicking its name and clicking SSH from the instance details page. An SSH terminal window will open with the Ubuntu Linux instance that was created in the second post of the series. You should now be able to run commands in Ubuntu Linux created on the Google Cloud server.
How to install a database server on Google Cloud Servers
Installing MySQL or MariaDB on Ubuntu Linux is no different, whether on Google Cloud or a local VM instance. Both MySQL and MariaDB packages are available in Ubuntu’s default repositories. One can simply use the apt-get commands to download and install database packages on Ubuntu Linux. A detailed post and help on how to install MySQL or MariaDB on Ubuntu Linux are at the link below. Click on it to learn more about installing and managing MySQL or MariaDB database servers on Ubuntu Linux. How to install MySQL or MariaDB on Ubuntu Linux With a database server installed, and your domain name pointing to your Google Cloud server, you should now be able to store content within a database. We’re now far ahead in the process of creating a website online using a web server, PHP server-side language, and a database server, and just about ready to tie all these servers and software together for your website to be ready. We’re now ready to be configuring our servers and packages to get the website going. Please stay tuned and continue reading up on our previous posts. Conclusion: This post showed you how to install MySQL or MariaDB on Ubuntu Linux in Google Cloud. If you find any error above or have something to add, please use the comment form below.