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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With