Access to Google Cloud SQL (MySQL) using DBeaver

Prerequisites

  1. Get Google Service Account private key file in json
  2. Setup environment variable  
    • GOOGLE_APPLICATION_CREDENTIALS – name of the private key file with full path 

Driver settings

  1. Setup a new connection and select MySQL 8+ database
  2. Edit Driver Settings 
    1. Add the following files to Libraries:
      • Mysql-socket-factory-connector-j-8-1.0.15-jar-with-dependencies.jar
      • Mysql-connector-java-8.0.19.jar
    2. Add new properties:
      • socketFactory com.mysql.cj.protocol.StandardSocketFactory
      • cloudSqlInstance google-project-name:region:instanceName