远程mysql:errno:-111,代码:' econnrefused',syscall:' connect',地址:&#x27.0.0.0.0.0.0.1&#x27&#x27&port:3306
在这里进行反应初学者。我刚刚部署了一个应用程序的早期α,目前遇到了此错误-111,从此站点说这是MySQLD仅倾听Localhost接口时发生的问题。我正在使用免费的远程MySQL来测试来自此站点。它说我必须找到我的.cnf并进行修改,以允许除Localhost之外的连接。
- 如果我使用我无法控制的免费远程mysql,它将起作用吗?
- 如果我尝试另一项可能有所不同的免费远程MYSQL服务,它将起作用?
2022-05-04T06:22:09.121413+00:00 app[web.1]: Error: connect ECONNREFUSED 127.0.0.1:3306
2022-05-04T06:22:09.121421+00:00 app[web.1]: at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)
2022-05-04T06:22:09.121421+00:00 app[web.1]: --------------------
2022-05-04T06:22:09.121422+00:00 app[web.1]: at Protocol._enqueue (/app/node_modules/mysql/lib/protocol/Protocol.js:144:48)
2022-05-04T06:22:09.121422+00:00 app[web.1]: at Protocol.handshake (/app/node_modules/mysql/lib/protocol/Protocol.js:51:23)
2022-05-04T06:22:09.121423+00:00 app[web.1]: at PoolConnection.connect (/app/node_modules/mysql/lib/Connection.js:116:18)
2022-05-04T06:22:09.121423+00:00 app[web.1]: at Pool.getConnection (/app/node_modules/mysql/lib/Pool.js:48:16)
2022-05-04T06:22:09.121424+00:00 app[web.1]: at Pool.query (/app/node_modules/mysql/lib/Pool.js:202:8)
2022-05-04T06:22:09.121424+00:00 app[web.1]: at /app/routes/operations/login.js:27:24
2022-05-04T06:22:09.121424+00:00 app[web.1]: at new Promise (<anonymous>)
2022-05-04T06:22:09.121425+00:00 app[web.1]: at getInput (/app/routes/operations/login.js:20:16)
2022-05-04T06:22:09.121425+00:00 app[web.1]: at /app/routes/operations/login.js:106:28
2022-05-04T06:22:09.121425+00:00 app[web.1]: at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5) {
2022-05-04T06:22:09.121426+00:00 app[web.1]: errno: -111,
2022-05-04T06:22:09.121426+00:00 app[web.1]: code: 'ECONNREFUSED',
2022-05-04T06:22:09.121427+00:00 app[web.1]: syscall: 'connect',
2022-05-04T06:22:09.121427+00:00 app[web.1]: address: '127.0.0.1',
2022-05-04T06:22:09.121427+00:00 app[web.1]: port: 3306,
2022-05-04T06:22:09.121427+00:00 app[web.1]: fatal: true
2022-05-04T06:22:09.121428+00:00 app[web.1]: }
React beginner here. I just deployed an early-alpha of an app and currently getting this error -111 which from this site says that its a problem that occurs when mysqld only listens to the localhost interface. I'm using a free remote mysql for testing from this site. It says that I have to find my.cnf and modify it to allow connections aside from localhost.
- Will it work if I edit my my.cnf or no because I'm using a free remote mysql that I have no control of?
- Will it work if I try another free remote mysql service that may work differently?
2022-05-04T06:22:09.121413+00:00 app[web.1]: Error: connect ECONNREFUSED 127.0.0.1:3306
2022-05-04T06:22:09.121421+00:00 app[web.1]: at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)
2022-05-04T06:22:09.121421+00:00 app[web.1]: --------------------
2022-05-04T06:22:09.121422+00:00 app[web.1]: at Protocol._enqueue (/app/node_modules/mysql/lib/protocol/Protocol.js:144:48)
2022-05-04T06:22:09.121422+00:00 app[web.1]: at Protocol.handshake (/app/node_modules/mysql/lib/protocol/Protocol.js:51:23)
2022-05-04T06:22:09.121423+00:00 app[web.1]: at PoolConnection.connect (/app/node_modules/mysql/lib/Connection.js:116:18)
2022-05-04T06:22:09.121423+00:00 app[web.1]: at Pool.getConnection (/app/node_modules/mysql/lib/Pool.js:48:16)
2022-05-04T06:22:09.121424+00:00 app[web.1]: at Pool.query (/app/node_modules/mysql/lib/Pool.js:202:8)
2022-05-04T06:22:09.121424+00:00 app[web.1]: at /app/routes/operations/login.js:27:24
2022-05-04T06:22:09.121424+00:00 app[web.1]: at new Promise (<anonymous>)
2022-05-04T06:22:09.121425+00:00 app[web.1]: at getInput (/app/routes/operations/login.js:20:16)
2022-05-04T06:22:09.121425+00:00 app[web.1]: at /app/routes/operations/login.js:106:28
2022-05-04T06:22:09.121425+00:00 app[web.1]: at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5) {
2022-05-04T06:22:09.121426+00:00 app[web.1]: errno: -111,
2022-05-04T06:22:09.121426+00:00 app[web.1]: code: 'ECONNREFUSED',
2022-05-04T06:22:09.121427+00:00 app[web.1]: syscall: 'connect',
2022-05-04T06:22:09.121427+00:00 app[web.1]: address: '127.0.0.1',
2022-05-04T06:22:09.121427+00:00 app[web.1]: port: 3306,
2022-05-04T06:22:09.121427+00:00 app[web.1]: fatal: true
2022-05-04T06:22:09.121428+00:00 app[web.1]: }
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论