---
title: MySQL instance should have the 'skip_show_database' flag set to 'on'
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > Datadog Security > OOTB Rules > MySQL instance should have the
  'skip_show_database' flag set to 'on'
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# MySQL instance should have the 'skip_show_database' flag set to 'on'
 
## Description{% #description %}

This rule fails when a Cloud SQL for MySQL instance does not set the `skip_show_database` database flag to `on`. With the flag on, only users with the `SHOW DATABASES` privilege can run the `SHOW DATABASES` statement, which limits who can enumerate the databases on the instance. An instance that does not set the flag fails, because MySQL turns it off by default. Flag names and values are compared case-insensitively, and the instance fails if any `skip_show_database` entry has a value other than `on`. Instances running other database engines are skipped, and an instance with a missing or unspecified database version fails because its engine cannot be determined. A database flag with no name also fails, because it could be `skip_show_database`.

## Remediation{% #remediation %}

Setting this flag restarts the instance. For the flagged instance, set `skip_show_database` to `on` by following [Configure database flags](https://docs.cloud.google.com/sql/docs/mysql/flags).

## References{% #references %}

- [MySQL skip_show_database](https://dev.mysql.com/doc/refman/8.4/en/server-system-variables.html#sysvar_skip_show_database)
- [CIS Google Cloud Platform Foundation Benchmark](https://www.cisecurity.org/benchmark/google_cloud_computing_platform)
