Play Frameworkで MySQLを使いたい!
表題通り、Play FrameworkでMySQLの設定をしています。
しかし、設定がうまくいきません。
複数のエラーが出ており、どこでどのエラーが対応しているか混乱しているため、設定とエラー内容を下記にて説明させていただきます。
PC等の設定に関して
macbook Pro
java 8
mysql Ver 8.0.16
Play Framerowkの設定に関して
application.confファイル
db { # You can declare as many datasources as you want. # By convention, the default datasource is named `default` # https://www.playframework.com/documentation/latest/Developing-with-the-H2-Database default.driver=com.mysql.jdbc.Driver default.url="jdbc:mysql://localhost:3306/play_db" default.user="root" default.password="Ryubb@1531" // default.poolInitialSize = 10 // default.poolMaxSize = 10 # You can turn on SQL logging for any datasource # https://www.playframework.com/documentation/latest/Highlights25#Logging-SQL-statements #default.logSql=true }
build.sbtファイル
name := """line_app_play""" version := "1.0-SNAPSHOT" lazy val root = (project in file(".")).enablePlugins(PlayJava, PlayEbean) scalaVersion := "2.11.7" libraryDependencies ++= Seq( javaJdbc, cache, javaWs, "mysql" % "mysql-connector-java" % "8.0.16" )
エラー内容(画像)
追記
2019/7/25(Thu)
編集依頼を受けて、mysql -u root -pRyubb@1531 play_dbコマンドを実行した結果です
~> mysql -u root -pRyubb@1531 play_db mysql: [Warning] Using a password on the command line interface can be insecure. ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
あなたの回答
tips
プレビュー