我跟进了Play 2.5文档
MySQL数据库引擎连接属性
# Default database configuration using MySQL database engine
# Connect to playdb as playdbuser
db.default.driver=com.mysql.jdbc.Driver
db.default.url="jdbc:mysql://localhost/playdb"
db.default.username=playdbuser
db.default.password="a strong password"
我将以下几行添加到application.conf
中# Default database configuration using MySQL database engine
# Connect to playdb as playdbuser
db.default.driver=com.mysql.jdbc.Driver
db.default.url="jdbc:mysql://localhost/playdb"
db.default.username=root
db.default.password="password"
我收到了错误
Configuration error
Cannot connect to database [db]
我在Mac上使用本地mysql进行测试。用户名和密码是正确的。
创建了playdb数据库。
的MySQL>显示数据库; + --------------------- + |数据库| + --------------------- + | information_schema | | library_development | | library_production | | library_test | | mysql | | performance_schema | | playdb | | sys | + --------------------- + 8行(0.00秒)
由于