errorError: getaddrinfo ENOTFOUND - mysql

前端 未结 5 1447
温柔的废话
温柔的废话 2021-01-18 01:17

I\'m running a server on c9.io using Node.js and trying to connect to Mysql I guess I get this error:

Error: getaddrinfo ENOTFOUND

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-18 01:24

    I was facing this issue. I did fix it simply you have to change your configuration of a connection string like if you are running on local machine try

    host:'localhost' or host:'127.0.0.1'

    ...and set your user name and if you want this to publish your code on server then give the host according to server if in docker container give it name host:'db'.

提交回复
热议问题