我正在使用 Pentaho Report Designer 5.2。在尝试使用 JNDI 连接到 MySQL 数据库时,我遇到错误:无效的数据源:'openflights'
但我的数据库中存在一个表“openflights”。
这是 JNDI 配置
#MySQL - openflights
openflights/type=javax.sql.DataSource
openflights/driver=org.gjt.mm.mysql.Driver
openflights/user=pentaho_user
openflights/password=password
openflights/url=jdbc:mysql://localhost:3306/openflights
最佳答案
您在哪里定义了 JNDI 详细信息?
将 DRIVER 值更改为 com.mysql.jdbc.Driver
在“C:\Users{YOURUSER}.pentaho\simple-jndi\default.properties”中添加 JNDI,然后停止 bi 服务器并再次启动
关于mysql - 连接数据库时出错: "Invalid Datasource",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36441516/