java.sql.SQLException:未知的系统变量'tx_isolation'
2022-09-04 05:52:11
我正在使用play框架,我想连接db,但我不能,因为我得到以下错误:
play.api.Configuration$$anon$1: Configuration error[Cannot connect to database [default]]
Caused by: play.api.Configuration$$anon$1: Configuration error[Failed to initialize pool: Unknown system variable 'tx_isolation']
Caused by: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: Unknown system variable 'tx_isolation' java.sql.SQLException: Unknown system variable 'tx_isolation
我试图找到,但它不存在:tx_isolation
mysql> show variables like 'tx_isolation';
Empty set (0.00 sec)
那么是什么,我怎么能找到?tx_isolation
不好意思。这是我的错误代码。我使用mysql 8.0.11。所以我找到“transaction_isolation”
play.db {
config = "db"
default = "default"
}
db {
//TODO : 작업필요
default.driver = com.mysql.jdbc.Driver
default.url = "jdbc:mysql://127.0.0.1:3306/testPlayDB"
default.username = root
default.password = "321A@654"
}
错误原因 Default.url = “jdbc:mysql://127.0.0.1:3306/testPlayDB”
我第一次使用Scala,playframework和StackOverflow...
谢谢。