title: Can't connect to MySQL server at 127.0.0.1 using c3p0
body: <p>Trying to connect to MySQL server using the following code in Java with c3p0:</p>
  
  <pre><code>comboPooledDataSource = new ComboPooledDataSource();  
  comboPooledDataSource.setJdbcUrl("jdbc:mysql://127.0.0.1:3306/" + Dbname);  
  comboPooledDataSource.setUser(Username);  
  comboPooledDataSource.setPassword(Password);  
  comboPooledDataSource.setInitialPoolSize(15);  
  comboPooledDataSource.setMaxPoolSize(20);  
  comboPooledDataSource.setMinPoolSize(10);  
  connection = comboPooledDataSource.getConnection();
  </code></pre>
  
  <p>Although I have checked that the DB is up and running and I can connect to it using Python it keeps throwing me the following error:</p>
  
  <pre><code>INFO: Initializing c3p0 pool...com.mchange.v2.c3p0.ComboPooledDataSource@b4c966a[ acquireIncrement -&gt; 3, acquireRetryAttempts -&gt; 30, acquireRetryDelay -&gt; 1000, autoCommitOnClose -&gt; false, automaticTestTable -&gt; null, breakAfterAcquireFailure -&gt; false, checkoutTimeout -&gt; 0, connectionTesterClassName -&gt; com.mchange.v2.c3p0.impl.DefaultConnectionTester, description -&gt; null, driverClass -&gt; null, factoryClassLocation -&gt; null, forceIgnoreUnresolvedTransactions -&gt; false, identityToken -&gt; b4c966a, idleConnectionTestPeriod -&gt; -1, initialPoolSize -&gt; 30, jdbcUrl -&gt; jdbc:jtds:mysql://127.0.0.1:3306/sip_base, loginTimeout -&gt; 0, maxIdleTime -&gt; 0, maxPoolSize -&gt; 20, maxStatements -&gt; 0, maxStatementsPerConnection -&gt; 0, minPoolSize -&gt; 10, numHelperThreads -&gt; 3, preferredTestQuery -&gt; null, properties -&gt; {user=******, password=******}, propertyCycle -&gt; 300, testConnectionOnCheckin -&gt; false, testConnectionOnCheckout -&gt; false, usesTraditionalReflectiveProxies -&gt; false ]
  Μαϊ 12, 2015 10:41:12 ΠΜ com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask run
  WARNING: com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@7e2889c7 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30).
  Μαϊ 12, 2015 10:41:12 ΠΜ com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask run
  WARNING: com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@372567de -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30).
  Exception in thread "main" java.sql.SQLException: Connections could not be acquired from the underlying database!
  at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:104)
  at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:264)
  at com.mchange.v2.c3p0.PoolBackedDataSource.getConnection(PoolBackedDataSource.java:94)
  at com.mchange.v2.c3p0.ComboPooledDataSource.getConnection(ComboPooledDataSource.java:521)
  at gov.nist.sip.proxy.extended.DBServer.&lt;init&gt;(DBServer.java:52)
  at gov.nist.sip.proxy.extended.DBServer.getInstance(DBServer.java:64)
  at gov.nist.sip.proxy.extended.DBServer.main(DBServer.java:161)
  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.awaitAcquire(BasicResourcePool.java:972)
  at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:208)
  at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:260)
  ... 5 more
  </code></pre>