Mule database connector url format for DB2 not correct

懵懂的女人 提交于 2019-12-25 16:50:07

问题


I am trying Mule's Database Connector to connect to a DB2 database but I couldn't figure out the correct format for the database URL. I created a Generic Database Configuration global element with Database URL

jdbc:db2://db01.dev.myserver.org:50000/mydb;User=test;Password=secret

And Driver

com.ibm.db2.jcc.DB2Driver

When I click Test Connection, it says

Test connection failed: Cannot get connection for URL
jdbc:db2://db01.dev.myserver.org:50000/mydb;User=test;Password=secret :
[ibm][db2][jcc][t4][10205][11234] Null userid is not supported. 

How shall I put the username and password in the URL?

Thanks!


回答1:


JDBC properties, such as user and password need to be separated from the rest of the URL with a colon (":"), and each property, including the last one, should be terminated with a semicolon (";"). I suspect the property names may be also case-sensitive. So

jdbc:db2://db01.dev.myserver.org:50000/mydb:user=test;password=secret;

Reference: http://www-01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.apdv.java.doc/src/tpc/imjcc_rjvdsprp.html?lang=en



来源:https://stackoverflow.com/questions/26042064/mule-database-connector-url-format-for-db2-not-correct

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!