3

I tried to connect AppMaker to an existing Google SQL database without success. In Google Cloud, I created a second generation instance (europe-west1) and allow every IP (for the test). Next, I created a user, connected Workbench with the database and created a schema. Without problems. In AppMaker I use the following address to connect to the database:

[domainName:]myprojectID:regionName:myinstanceID/mydatabase (with and without domain)

Feedback:

Unable to connect to Google Cloud SQL instance. The Google Cloud SQL address may be incorrect or this App Maker editor may not have permission to access the database. You can find more information about using Google Cloud SQL in our documentation.

How can I connect to Google SQL with AppMaker?

Thanks.

Bas
  • 33
  • 3
  • Can you give some more details about the steps you have taken when trying to connect AppMaker with Google Cloud SQL? Did you get that error at step 3 here? https://developers.google.com/appmaker/models/cloudsql – Herman Jan 16 '17 at 18:04

3 Answers3

3

The process I followed to connect to the database is the following:

  1. Create a second generation instance by following the steps here (Please make sure to follow the steps only for "Create a Cloud SQL instance" and then create a database inside that instance)
  2. Now, go to the IAM & ADMIN section of your project. Click on the blue "add" member option on the top. Type "appmaker-maestro@appspot.gserviceaccount.com" on the "Members" field and from the "Roles" dropdown select Project->Editor
  3. Return to your second generation SQL instance and copy the value of the Instance connection name property of your instance. Example: enter image description here
  4. Follow the steps for second generation found here to connect to the database from AppMaker and when asked for the instance address, type the value you copied on the previous step and add /yourdatabase at the end of it. For example: my-foto-app:us-central1:myinstance/userphotodatabase
  5. You should now be asked to enter the user and password. Do so and you are finished.

Please note that I haven't tested out this with a europe location but only on a us central location. I hope this helps and works!

Morfinismo
  • 4,985
  • 4
  • 19
  • 36
  • 1
    Thanks. It works! Where did you find "appmaker-maestro@appspot.gserviceaccount.com" in the documentation? I was able to create the connection in Europe with a second generation Google SQL. – Bas Jan 17 '17 at 11:01
  • Kind of. I mean, it is in the documentation. Step 4 of the instructions to connect to a first generation instance gives you the "appmaker-maestro" part and the rest is [here](https://cloud.google.com/sql/docs/mysql/connect-app-engine#gaev1-csqlv2) – Morfinismo Jan 17 '17 at 16:40
  • 2
    Also, note that PostgreSQL is not supported in AppMaker yet so you must use MySQL. – Scott Mar 21 '17 at 14:03
0

Second generation instances are not yet supported by App Maker, switch to first generation and it will work.

Tony BenBrahim
  • 7,040
  • 2
  • 36
  • 49
  • 1
    Appmaker is reporting that second generation is now supported https://developers.google.com/appmaker/models/cloudsq date on that page is 6th Feb 2018 – rob Apr 24 '18 at 09:16
0

FYI, 2nd gen Cloud SQL is supported bv App Maker and has been for awhile. As of today, Postgre is not yet supported.