Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Cant Connect Mysql to Node JS in GCP

HI, i'm learn about how to connect REST API node js to MySQL and deploy it in cloud run. i'm also following this yt video: https://youtu.be/_w_idf928WY?feature=shared 

but i got problem, 

  • when i tried looking up service url ( api/poodles), i got "service unavailable
  • got error code "ENOENT when test POST in postman

What have i missed??

 

0 1 596
1 REPLY 1

Hi @arknight,

Welcome to Google Cloud Community!

Your API endpoint isn't found ("ENOENT" error)

Possible reasons:

  • Incorrect URL: Double-check your Postman URL against deployed service URL (case & slashes).
  • Missing route handler: Code doesn't handle "api/poodles" POST requests.
  • Deployment issue: Verify Cloud Run service is running.
  • MySQL connection problem: Check connection parameters and Cloud SQL access.

Tips:

  • Share relevant Node.js code.
  • Check server logs for errors.
  • Review Cloud Run and MySQL library documentation.

Documentation Reference:

Cloud Run:

Node.js & MySQL:

Cloud SQL: