-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
服务端无法连接mysql #15
Comments
你比我厉害,虽然我的报错解决了,但是就是打不开首页,直接返回空白页,打开后端端口返回404,难顶,整一天了,你的安装好的这个可以发我一份吗 |
返回404是正常,访问那个端口就是返回404,你是不是把那个gloxxx.xx.js文件里后端地址写了127.0:3002啥的,如果写那个那就是空白,你可以看网络你在其他机器打开,他会在你当前机器上去求情写的那个地址,不会变通 |
打开浏览器的调试,访问前端端口,能看到确实是在访问后端,但是请求得不到响应 |
那就不知道了,这个问题我也遇到了,因为我是写的127.0.0.1,东西搭建在虚拟机里,所以访问后端的时候他请求的是127.0.0.1:3002,改成虚拟机地址后,他才正常,跑是跑起来了,但是上传后的图片看不到,并且复制图片地址,默认给的是127.0.0.1,感觉还有不少地方有问题,就没弄了 |
报错信息如下,试了下改mysql的端口,什么的都不行,用navicat连mysq到是正常,这是啥子情况哇
访问启动成功: http://localhost:3002
/app/node_modules/sequelize/src/dialects/mysql/connection-manager.js:116
throw new SequelizeErrors.ConnectionRefusedError(err);
^
ConnectionRefusedError [SequelizeConnectionRefusedError]: connect ECONNREFUSED 127.0.0.1:3333
at ConnectionManager.connect (/app/node_modules/sequelize/src/dialects/mysql/connection-manager.js:116:17)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ConnectionManager._connect (/app/node_modules/sequelize/src/dialects/abstract/connection-manager.js:332:24)
at async /app/node_modules/sequelize/src/dialects/abstract/connection-manager.js:250:32
at async ConnectionManager.getConnection (/app/node_modules/sequelize/src/dialects/abstract/connection-manager.js:280:7)
at async /app/node_modules/sequelize/src/sequelize.js:638:26
at async MySQLQueryInterface.tableExists (/app/node_modules/sequelize/src/dialects/abstract/query-interface.js:242:17)
at async Function.sync (/app/node_modules/sequelize/src/model.js:1349:21)
at async Sequelize.sync (/app/node_modules/sequelize/src/sequelize.js:825:9) {
parent: Error: connect ECONNREFUSED 127.0.0.1:3333
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 3333,
fatal: true
},
original: Error: connect ECONNREFUSED 127.0.0.1:3333
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 3333,
fatal: true
}
}
The text was updated successfully, but these errors were encountered: