Possible duplicate: Create a MySQL connection in Playframework with slick
I am using play-slick plugin to try connecting with mysql database. But I get connection timeout error every time slick tries to communicate with the Db. My application.conf file is as follow:
slick.dbs.default.driver= "slick.driver.MySQLDriver$"
slick.dbs.default.db.dataSourceClass = "slick.jdbc.DatabaseUrlDataSource"
slick.dbs.default.db.properties.driver = "com.mysql.jdbc.Driver"
slick.dbs.default.db.url="jdbc:mysql://127.0.0.1:3306"
slick.dbs.default.db.username="root"
slick.dbs.default.db.password="xxxx"
slick.dbs.default.db.connectionTimeout=15s
slick.dbs.default.db.numThreads = 12
slick.dbs.default.db.connectionTestQuery="select 1"
And whenever my application tries to communicate with the database it gets this error:
play.api.http.HttpErrorHandlerExceptions$$anon$1: Execution exception[[SQLTimeoutException: Timeout after 15001ms of waiting for a connection.]]
at play.api.http.HttpErrorHandlerExceptions$.throwableToUsefulException(HttpErrorHandler.scala:265) ~[play_2.11-2.4.3.jar:2.4.3]
I have checked that mysql is listening on port 3306. There is a service mysqld that's running. Thanks for the help.