By Alvin Alexander. Last updated: June 6, 2016
I just started using the Play Framework 2 with MySQL, and because I use MAMP in my development environment, MySQL runs on port 8889, and not the MySQL default port of 3306. In short, to get the Play Framework to work with MySQL like this, I had to put these properties in the Play application.conf file:
db.default.url="jdbc:mysql://localhost:8889/finance" db.default.driver=com.mysql.jdbc.Driver db.default.user=root db.default.pass=root
This is a little different than what the Play documentation looks like at the moment, but I can confirm that it works, letting me connect Play to MySQL on this different port.