I am trying to make a simple java application that connects to database in Squirrel SQL which I use JDBC connector to connect to but I can't seem to pass making the database in Squirrel. I have my jdbc jar file in place as there is a blue tick indicating my driver is available but but I am not where I might be going wrong. Your shed of insight is highly appreciated. Thank you in advance. Below are pictures of what my setup looks like
2 Answers
Your database is a MySQL one. Instead of "jdbc" driver, use a MySQL one. It is "MySQL Driver" in the Drivers menu. attach your jar file and then in the Aliases definition, use the MySQL Driver you just configured.

- 1,639
- 2
- 17
- 35
-
Thanx Javadev much appreciated, after your suggestion I went to this link which helped me do what you suggested. http://ourlife01.blogspot.com/2012/04/configure-squirrel-with-mysql.html – Raymond Nakampe May 21 '13 at 18:38
You should either use (or modify) a pre-existing RDBMS driver for MySQL or make your own and label it as a MySQL driver.
The key piece of information that may be missing is the qualified path to your RDBMS home directory. Squirrel needs to be able to find the jar file that contains the JDBC driver for the RDBMS product that you'll be using.
While I haven't set up Squirrel for MySQL, I have set it up for HSQLDB. In the "Extra Class Path" tab of the change driver dialog, I have added and entered the path to my hsqldb.jar file:
C:\App\Dev\Java\DB\hsqldb\2.2.9\lib\hsqldb.jar
This enables the service provider in the JDBC driver package to locate and load the particular JDBC driver for HSQLDB.
Just as a side note, every RDBMS has its own semantics for the connection URL. The one for HSQLDB is unique to it. The one for MySQL (according to the folks at SquirrelSQL) is:
jdbc:mysql://<hostname>[,<failoverhost>][<:3306>]/
<dbname>[?<param1>=<value1>][&<param2>=<value2>]

- 9,908
- 3
- 40
- 56
-
Thank you scottb, your insight also helped,I cheked that as well and your are right, it has that url. Thanks for your help – Raymond Nakampe May 21 '13 at 18:42