Though I am a .Net guy working on Java always facinates me with some compromise and little complaints. One of the tough thing is to get the drivers of different databases (non-conventional one's) when we need especially on Open source databases. It is not available on the readme files when you download the database jars. Ofcourse, we can figure it out from google, but I thought of putting it in this blog some of the JDBC Drivers with URL so that you need not have to google for each open source drivers and url.
The following are some of the open source database connectivity parameters which I came across when I worked with java recently.
#FOR MYSQL
Url=jdbc:mysql://localhost:3306/
Driver=com.mysql.jdbc.Driver
Please note the mysql can have a server mode and hence the url might differ. In general, when you install mysql in your desktop and use it then the above holds good. The default port is 3306 and if you talented enough to change it then I believe you are equally talented enough to figure out the url :).
#FOR DERBY
URL=jdbc:derby:DBNAME;create=true
Driver=org.apache.derby.jdbc.EmbeddedDriver
The DB is created with the DBName you specify in Derby (aka Javadb) when you say create=true.
#FOR SMALLSQL
URL=jdbc:smallsql:DBNAME
Driver=smallsql.database.SSDriver
#FOR HSQL
URL=jdbc:hsqldb:DBNAME
Driver=org.hsqldb.jdbcDriver
#FOR H2
URL=jdbc:h2:~/test
Driver=org.h2.Driver
Hope this helps to few atleast.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment