【问题标题】:connect mySQL with Nodejs将 mySQL 与 Nodejs 连接
【发布时间】:2013-09-05 04:58:17
【问题描述】:

我正在尝试为 Node.js 安装 mysql 驱动程序 但我遇到了错误。

有人可以帮助我吗?

在此先感谢 :)

C:\tmp\node>npm 安装 mysql

npm http GET http://registry.npmjs.org/mysql
npm http GET http://registry.npmjs.org/mysql
npm http GET http://registry.npmjs.org/mysql
npm ERR! network getaddrinfo ENOTFOUND
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settin
gs.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! System Windows_NT 5.1.2600
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "mysql"
npm ERR! cwd C:\tmp\node
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.3.5`enter code here`
npm ERR! syscall getaddrinfo
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\tmp\node\npm-debug.log
npm ERR! not ok code 0

【问题讨论】:

  • 您查看C:\tmp\node\npm-debug.log 是否有更多信息?

标签: mysql windows node.js npm


【解决方案1】:

错误未严格连接到 mysql 模块。 可能您在代理后面,请尝试按照此处的说明如何在代理后面设置 npm:

http://jjasonclark.com/how-to-setup-node-behind-web-proxy

【讨论】:

    猜你喜欢
    • 2018-10-26
    • 2020-05-16
    • 2020-04-09
    • 2014-11-06
    • 2012-03-19
    • 1970-01-01
    • 2021-04-27
    • 2018-08-01
    • 1970-01-01
    相关资源
    最近更新 更多