当前位置:网站首页>errno: -4078, code: ‘ECONNREFUSED‘, syscall: ‘connect‘, address: ‘127.0.0.1‘, port: 3306; Postman error

errno: -4078, code: ‘ECONNREFUSED‘, syscall: ‘connect‘, address: ‘127.0.0.1‘, port: 3306; Postman error

2022-06-12 02:38:00 Guguwai

problem :

node ./app.js Later error reporting ; meanwhile ,postman Also reported wrong , The interface cannot be tested normally .

Problem solving :

1. open default.json.

2. And the port number port From the original 3306 It is amended as follows 3308( because 3306 It's already occupied ), preservation .

ps:dbconfig Class is responsible for configuring database access information , Include : Server address 、 port 、 Database instance name 、 user name 、 User password 、 Character set, etc. .

3. stay app.js In the directory ( That is to say vue_api_server) Next cmd, And again node ./app.js( So that api The interface project runs ), Successfully connected to the database . And now postman You can also send requests and return results .

原网站

版权声明
本文为[Guguwai]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/163/202206120231350509.html