6.1.1 Ensure that a MySQL database instance does not allow anyone to connect with administrative privileges

Warning! Audit Deprecated

This audit has been deprecated and will be removed in a future update.

View Next Audit Version

Information

It is recommended to set a password for the administrative user (root by default) to prevent unauthorized access to the SQL database instances.

This recommendation is applicable only for MySQL Instances. PostgreSQL does not offer any setting for No Password from the cloud console.

Rationale:

At the time of MySQL Instance creation, not providing an administrative password allows anyone to connect to the SQL database instance with administrative privileges. The root password should be set to ensure only authorized users have these privileges.

Impact:

Connection strings for administrative clients need to be reconfigured to use a password.

NOTE: Nessus has provided the target output to assist in reviewing the benchmark to ensure target compliance.

Solution

From Console:

Go to the Cloud SQL Instances page in the Google Cloud Platform Console using https://console.cloud.google.com/sql/

Select the instance to open its Overview page.

Select Access Control > Users.

Click the more actions icon for the user to be updated.

Select Change password, specify a new password, and click OK.

From Command Line:
Set a password to a MySql instance:

gcloud sql users set-password [USER_NAME] [HOST] --instance=[INSTANCE_NAME] --password=[PASSWORD]

Default Value:

From the Google Cloud Platform Console, the Create Instance workflow enforces the rule to enter the root password unless the option No Password is selected explicitly.

See Also

https://workbench.cisecurity.org/files/3316