Documentation forDatabase Performance Analyzer

Register a MySQL instance running in the Google Cloud Platform

The following sections provide instructions for using a wizard to register a MySQL instance running in the Google Cloud Platform for monitoring with DPA.

Alternatively, you can use mass registration to registrations to register multiple database instances, or you can register database instances using scripts that call the DPA API.

Task 1: Create the monitoring user

Complete the following steps to create the user that DPA uses to monitor the MySQL database instance.

  1. Create the DPA monitoring user through the Google Cloud Platform. For more information, see Create a user in the Cloud SQL documentation.
  2. Run the following commands to grant the monitoring user the privileges required for monitoring:

    GRANT SELECT ON performance_schema.* TO 'dpa_user'@'%';

    GRANT UPDATE ON performance_schema.* TO 'dpa_user'@'%';

    GRANT PROCESS ON *.* TO 'dpa_user'@'%';

    GRANT SELECT ON *.* TO 'dpa_user'@'%';

  3. Run the following commands to grant the monitoring user the privileges required to enable the retrieval of query execution plans:

    GRANT INSERT ON *.* TO 'dpa_user'@'%';

    GRANT UPDATE ON *.* TO 'dpa_user'@'%';

    GRANT DELETE ON *.* TO 'dpa_user'@'%';

Task 2: Register the database instance

  1. In the upper-left corner of the DPA home page, click Register DB Instance for Monitoring.
  2. Under Google Cloud SQL, select Cloud SQL for MySQL. Then click Next.
  3. Complete the Connection information panel:

    1. Enter the host name or IP address of the database instance.

    2. Enter the port number.

    3. Enter the user name and password of the monitoring user created previously. Or, if DPA is configured to use CyberArk, enter the CyberArk credentials query for the monitoring user.

    4. Click Next.

      DPA validates the connection information and the privileges of the monitoring user.

  4. Specify the following Instance Options.

    The instance name and group membership can be changed after registration.

    1. Enter the name that DPA will display to identify this database instance.

      The Display name field defaults to the name retrieved from the database instance.

    2. (Optional) If you have manually created instance groups, you can assign this database instance to one of the groups.

      If no manual groups exist, this option is not shown.

    3. (Optional) If you have existing alert groups, you can assign this database instance to one or more groups.

      If no alert groups exist, or the existing groups do not match this instance's database type, this option is not shown.

    4. Click Next.

  5. Review the information on the Summary page. Click Back if you need to make changes. When the information is correct, click Register.

Task 3: Set up SSL communication for Cloud SQL for MySQL instances (Optional)

If you want to use SSL communication for a Cloud SQL for MySQL instance, use the Google Cloud SQL Auth proxy to enable it. Run the Google Cloud SQL Auth proxy for that database instance on the DPA server to create a secure tunnel between DPA and the Cloud SQL for MySQL instance. For more information, see About the Cloud SQL Auth proxy.