Please note that Sahi's development and support teams do not actively monitor this. This is more a community forum. If you are a Sahi Pro user looking for commercial support, please email support @ with your query.

Connecting Sahi Pro to MySQL DB

Hello there,

I'm currently trying to connect Sahi to an external database (Mysql 5.7.24) but it seems the jdbc url I typed is not the correct one.
db.password= is the local host, so it should be good, the database name, SAHI_LOGS, is correct as well, the driver is the same as in the docs ( Yet, when I start, i get an error:
exception: 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(
	at net.sf.sahi.plugin.PooledDBClient.getConnection(
	at net.sf.sahi.plugin.DBClient.execute(
	at Source)
Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
	at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(
	at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(
	at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(
	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutAndMarkConnectionInUse(
	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(
	... 8 more

I guessed my url is not the correct, but no solution has been found on internet. Can someone help me regarding this issue? What is the format of the jdbc url I should use?


  • I investigated a bit, and found an issue with Mysql. I changed the SQL_MODE to accept dates with zeros, thinking it would fix my issue, but it did not. Is someone have an explanation on why I can't connect to my DB?
  • edited December 2018
    I was meaning, obviously, not I tried localhost as well in the url, same issue. I changed the jdbc driver, to try if it would change anything, and unfortunately, no, still having the same error message.
Sign In or Register to comment.