Using Google Cloud SQL to Secure Your Database

(Credit: Christine Cignoli)

Many companies are experiencing exponential increases in data storage and data management, which attracts hackers to sneak peek into the databases. In 2020, the number of data breaches in the U.S. had hit 1001 cases due to inadequate data security measures (Johnson). This article is for all the software engineer interns who are interested in hosting databases with top-tier security measures. The sections that follow outline a single solution with multiple steps that you can use to protect databases with Google Cloud SQL.

Cloud SQL is a fully-managed database service offered by Google Cloud Platform. It delivers security capabilities and the latest security technologies to secure internal services, which block unauthorized people from user’s databases. Due to Cloud SQL’s high performance and seamless integration, it supports the user during the entire process of database development.

Activating Google Cloud Account

Before you do anything, you must create a Gmail account and connect it with the Google Cloud Platform. With an existing Gmail Account, you can skip registering personal information and directly jump to the Google Cloud term page. within Google Cloud account, you can set up Cloud Identity for your organization, which enables collaboration between you and your coworkers. (Google Cloud Platform).

If you have difficulty signing up for a Google account, AWS and Azure offer similar Cloud services.

Enabling Google Cloud SQL Service

After creating a Google Cloud account, you are required to have a project for the Cloud SQL service. You need to configure a set of information to define how the project interacts with Google Cloud. Additionally, most of Google Cloud's features are inactive by default due to resource concerns. You must enable Cloud SQL API within the project you created (CloudSQL).

If you have questions regarding the terminology, consider going over Google Cloud basic tutorial before moving further.

Initializing a SQL Instance

Once Cloud SQL API is enabled, you need to initialize a SQL instance to store and operate database files. Google Cloud only supports three types of instances, which are MySQL, PostgreSQL, and SQL Server. Depending on the type of your local database system, you need to choose the exact same option for SQL instance creation.

If your preferred database system is not on the list, you can choose one of the three database options and manually create the database afterward.

Creating Database within SQL Instance

After the SQL instance set up correctly, load your SQL scripts to generate a database and insert data into the database tables. At this point, your Cloud SQL database works the exact same as your local database.

If GCP cannot process your SQL script, then you must use Cloud Shell to create the database. After activating the shell, you can type down your SQL queries to build a database.

Exposing the Database to Public

To connect the database with your own applications, you need to authenticate a specific IP address to the Cloud SQL database (Cloud SQL). After adding your IP address to Cloud SQL, you are authorized to view, manage, and protect the dataset through the internet.

If you don’t know your IP address location, you can launch a browser to search for it.

Conclusion

Using Google Cloud SQL to manage your database can effectively increase database security. It automatically updates the database management system and scales up, which makes the hackers move on to other targets. Thus, you can have fewer concerns about data security, and maintaining the focus on software development. Next, you may try to shift your applications onto Google Cloud and integrate them with your new database on Cloud SQL.

About Me:

I am a DevOps Engineer and Cybersecurity expert with 5 years of experience in software development. I joined Google Cloud Platform in May 2016 as a software executive.

References

Johnson, Joseph. “Annual number of data breaches and exposed records in the United States from 2005 to 2020.” 3 March 2021. Statista. Web. 7 May 2021.

Cignoli, Christine. “Cloud Covered: What was new with Google Cloud in September.” 07 Oct. 2019. Google The Keyword. Web. 19 May 2021.

Cloud SQL. “Cloud SQL for PostgreSQL documentation.” N.d. Google Cloud. Web. 19 May 2021.

Cloud SQL. “Configuring public IP connectivity.” N.d. Google Cloud. Web. 19 May 2021.

Google Cloud Platform. “Control creation of Google Cloud Platform projects.” N.d. Google WorkSpace Admin Help. Web. 19 May 2021.

pgAdmin. “Backup Dialog.” N.d. pgadmin.org. Web. 19 May 2021.