Can't seem to connect to connect to a locally hosted MySQL 5 database using the jdbc driver.
My application is simply the one created by running play new on 1.4.x and I added the following to my application.conf
db.default.url="mysql://localhost:3306/test"
db.default.driver="com.mysql.jdbc.Driver"
db.default.user="jsmit"
db.default.password="pass123"
When I try to hit localhost:9000, I get the following error:
A database error occured : Cannot connected to the database[default], Database [default] Driver not found ("com.mysql.jdbc.Driver")
As I understand, this driver should be packaged in mysql-java-connector shipped under framework/lib. I couldn't find anyone running into this issue on play 1.X.
looks like
db.default.urlneeds to be loaded as an environment variable. In the example above, add the following in your shell's profile:and make your
application.confthe following: