Check that there is a Cloud SQL instance
Check that there is a user database on the Cloud SQL instance
Check that the blog instance is authorized to access Cloud SQL
Check that wp-config.php points to the Cloud SQL instance
Check that the blog still responds to requests
Migrate a MySQL Database to Google Cloud SQL
In a challenge lab you’re given a scenario and a set of tasks. Instead of following step-by-step instructions, you will use the skills learned from the labs in the quest to figure out how to complete the tasks on your own! An automated scoring system (shown on this page) will provide feedback on whether you have completed your tasks correctly.
When you take a challenge lab, you will not be taught new Google Cloud concepts. You are expected to extend your learned skills, like changing default values and reading and researching error messages to fix your own mistakes.
To score 100% you must successfully complete all tasks within the time period!
This lab is recommended for students preparing for the Google Cloud Certified Professional Cloud Architect certification exam. Are you up for the challenge?
Before you click the Start Lab button
Read these instructions. Labs are timed and you cannot pause them. The timer, which starts when you click Start Lab, shows how long Google Cloud resources will be made available to you.
This hands-on lab lets you do the lab activities yourself in a real cloud environment, not in a simulation or demo environment. It does so by giving you new, temporary credentials that you use to sign in and access Google Cloud for the duration of the lab.
To complete this lab, you need:
- Access to a standard internet browser (Chrome browser recommended).
- Time to complete the lab---remember, once you start, you cannot pause a lab.
Your WordPress blog is running on a server that is no longer suitable. As the first part of a complete migration exercise, you are migrating the locally hosted database used by the blog to Cloud SQL.
The existing WordPress installation is installed in the
/var/www/html/wordpress directory in the instance called
blog that is already running in the lab. You can access the blog by opening a web browser and pointing to the external IP address of the blog instance.
The existing database for the blog is provided by MySQL running on the same server. The existing MySQL database is called
wordpress and the user called blogadmin with password Password1*, which provides full access to that database.
- You need to create a new Cloud SQL instance to host the migrated database.
- Once you have created the new database and configured it, you can then create a database dump of the existing database and import it into Cloud SQL.
- When the data has been migrated, you will then reconfigure the blog software to use the migrated database.
For this lab, the WordPress site configuration file is located here:
To sum it all up, your challenge is to migrate the database to Cloud SQL and then reconfigure the application so that it no longer relies on the local MySQL database. Good luck!
Tips and tricks
Google Cloud SQL - How-To Guides: The Cloud SQL documentation includes a set of How-to guides that provide guidance on how to create instances and databases, and how to connect applications to those databases.
WordPress Installation and Migration: The WordPress Codex provides information on how to install, configure, and migrate WordPress sites. You will find the instructions on how to create and prepare databases for use with WordPress here.
Earn your next skill badge
This self-paced lab is part of the Cloud Architecture: Design, Implement, and Manage skill badge quest. Completing this skill badge quest earns you the badge above, to recognize your achievement. Share your badge on your resume and social platforms, and announce your accomplishment using #GoogleCloudBadge.
Google Cloud training and certification
...helps you make the most of Google Cloud technologies. Our classes include technical skills and best practices to help you get up to speed quickly and continue your learning journey. We offer fundamental to advanced level training, with on-demand, live, and virtual options to suit your busy schedule. Certifications help you validate and prove your skill and expertise in Google Cloud technologies.
Manual Last Updated August 28, 2022
Copyright 2023 Google LLC All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.