Play MySQL

1.create a schema in the mysql.(named task)

2.project/build.scala

val appDependencies = Seq(
      // Add your project dependencies here,
      "mysql" % "mysql-connector-java" % "5.1.18"
    )

use the sbt import the driver into the project

3.application.conf

db.default.driver=com.mysql.jdbc.Driver
db.default.url="jdbc:mysql://localhost/play"
db.default.user=root
db.default.password=*****

OK!

你可能感兴趣的:(play)