Fluent db migration fails

I'm trying to connect to mysql db on clever cloud dev account. I'm able to query the db in my vapor app fine. However, I cannot run migrate to create tables. I get the following error:

[ ERROR ] Opening new connection for pool failed: NIOCore.ChannelError.connectTimeout(NIOCore.TimeAmount(nanoseconds: 10000000000)) [database-id: mysql]
[ WARNING ] NIOCore.ChannelError.connectTimeout(NIOCore.TimeAmount(nanoseconds: 10000000000))
[ ERROR ] Application.shutdown() was not called before Application deinitialized.
Vapor/ServeCommand.swift:131: Assertion failed: ServeCommand did not shutdown before deinit
Illegal instruction: 4

I created the tables manually and I'm able to query and insert new rows. Any thoughts? Not sure if this is in any way related to me not being able to access my Synology DB server from vapor.

Are you sure you're querying the database fine in the Vapor app because it's the exact same connection and connection pool so there should be no difference there.

The error you're getting is when Fluent is trying to connect to the MySQL server socket and just not getting a response, normally caused by firewall issues or it just not listening on that port

My mistake. I noticed that it's still using the environment for the Synology which is why I'm getting that error. I pointed it to the right environment and it connected to the db.

I am getting this error both using MySQL and Postgres with Latest Vapor and Fluent versions on Mac OS X 15.5.

Is the DB running?

Yes it is running and I am able to connect to it using Sequel Ace app.
I have tried to switch to Postgre to see if it also has the same problem.
And I got a similar error but error message was more descriptive. It was about SSL.
I have fixed it changing TSL setting to .prefer from required.

var config = try SQLPostgresConfiguration(
    hostname: "localhost",
    username: "root",
    password: "root",
    database: "capital",
    tls: .prefer(.init(configuration: tlsConfig))
)

MySQL driver doesn't have similar option.
This is my TLS config:

var tlsConfig = TLSConfiguration.makeClientConfiguration()
tlsConfig.certificateVerification = .none

Setting the TLS if there's no DB server listening won't help. What's the exact error you get for MySQL?

Same error as the OP:

Opening new connection for pool failed

Can you please provide the full logs rather than just a snippet, that log message could be a number of things