dorbmd1177 2015-05-31 03:43 采纳率: 100%
浏览 72

错误nodejs与数据库的连接

Nodejs trying to connect to a database and pulls me hostinger this error before i use http://www.freemysqlhosting.net/ was similarly placing the host, user, pass and name of the database and did not erro I think that is the port but idk .. I'm using: app.listen (process.env.PORT || 3000)

So I'm doing:

var connection = mysql.createConnection ({
  host: 'mysql.hostinger.es',
  user: 'XXXXX',
  password: 'XX',
  database: 'XXX',
});

Error I get:

enter image description here

  • 写回答

1条回答 默认 最新

  • duan89197 2015-05-31 07:35
    关注

    It tells you that it couldn't resolve mysql.hostinger.es

    Check it's the good hostname or try to set directly the IP address.

    评论

报告相同问题?

悬赏问题

  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 目详情-五一模拟赛详情页
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b