Connecting to Google cloud sql from Java stand alone application

后端 未结 2 849
醉话见心
醉话见心 2020-12-22 05:59

I want to write a java stand alone application to connect to google cloud sql - MySql database. I could find samples for app client but not for a s

2条回答
  •  借酒劲吻你
    2020-12-22 06:51

    You can just use the standard mysql connector to connect to cloud sql instance: e.g:

    DriverManager.getConnection("jdbc:mysql://IP:Instance_name?user=user_name");
    

    You can check this link https://cloud.google.com/sql/docs/external for more information.

提交回复
热议问题