google app engine golang, driver: bad connection

前端 未结 1 1984
小鲜肉
小鲜肉 2021-01-14 13:34

I have some code that is working on the local GAE server but once I publish it to GAE it throws the error \"driver: bad connection\".

Below code generates a new *sql

1条回答
  •  孤城傲影
    2021-01-14 14:27

    I ended up needing to change my dbcloud variable to include the region of the SQL server changing it from:

    'projectid:instancename'
    

    To:

    'projectid:regionname:instancename'
    

    No idea why I need to do this as it's not in the docs of https://github.com/go-sql-driver/mysql but is all working now!

    0 讨论(0)
提交回复
热议问题