问题描述
我想将gcloud app引擎上的sails js应用程序与云mysql实例连接。我已启用我的公共ip网络和Cloud Sql Admin Api。我已经尝试在env / production.js中执行以下操作:-
adapter: 'sails-mysql',host : 'xx.xx.xx.xxx',user:'user',password:'password',database:'db_name',pool : true
我也尝试过使用socketPath代替主机,例如:-
default: {
adapter: 'sails-mysql',socketPath : '/cloudsql/' + 'connection name',pool : true
并且在上方也使用了googleCloudSQL
键而不是default
键。
但是在所有情况下,我都有适配器错误和连接错误。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)