Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vapor Connection refused (errno 61)

Tags:

swift

vapor

I'm seeing the following error when trying to run my Vapor 3 application:

Thread 1: Fatal error: Error raised at top level: NIO.ChannelError.connectFailed(NIO.NIOConnectionError(host: "127.0.0.1", port: 3306, dnsAError: nil, dnsAAAAError: nil, connectionErrors: [NIO.SingleConnectionFailure(target: [IPv4]127.0.0.1/127.0.0.1:3306, error: connection reset (error set): Connection refused (errno: 61))]))

It used to work just fine.
What can I do?

like image 393
LinusGeffarth Avatar asked Mar 17 '19 08:03

LinusGeffarth


1 Answers

It might be the case that the database server is not yet running.

For MySQL, open a terminal and run the command:

$ mysql.server start

For Postgres, do:

$ brew services start postgres

Then, try again to run the project. It should work again now :)


Taken from here.

like image 169
LinusGeffarth Avatar answered Nov 15 '22 19:11

LinusGeffarth