Database Connection

I want to link my MySQL database to Metabase. While I can connect the database to MySQL Workbench using the same credentials, I'm encountering a failure when trying to connect it to Metabase.

This is the part of log I am getting:

[49b7f8c1-c283-4adb-b323-f60a36e9f913] 2023-12-12T20:37:48+05:30 DEBUG metabase.server.middleware.log POST /api/database 400 20.0 s (2 DB calls)
{:message "Timed out after 10.0 s"}

[49b7f8c1-c283-4adb-b323-f60a36e9f913] 2023-12-12T20:37:50+05:30 DEBUG metabase.server.middleware.log GET /api/database 200 15.9 ms (3 DB calls) App DB connections: 0/15 Jetty threads: 3/50 (4 idle, 0 queued) (194 total active threads) Queries in flight: 0 (0 queued)
[49b7f8c1-c283-4adb-b323-f60a36e9f913] 2023-12-12T20:38:08+05:30 ERROR metabase.models.field-values Error fetching field values
java.sql.SQLException: Connections could not be acquired from the underlying database!
at com.mchange.v2.sql.SqlUtils.toSQLException(
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(
at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(

How should I go about debugging this?

timeout is simply that Metabase can't connect to the MySQL DB. The most probable answer here is: your Metabase server is not in the same network or does not have visibility of the MySQL DB and your MySQL workbench application does

Where's MySQL workbench running and where's Metabase?