Bug #19968 Generic JDBC Does Not Provide User and Password Fields
Submitted: 20 May 2006 14:18 Modified: 29 Jun 2006 19:15
Reporter: Larry Adams Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Migration Toolkit Severity:S1 (Critical)
Version:All OS:Any (All)
Assigned to: CPU Architecture:Any

[20 May 2006 14:18] Larry Adams
Description:
The MySQL Migration Toolkits Generic JDBC driver does not currently allow the user to provide a userid and password for connecting to the remote data source.

There have been discussions around the forum that you could provide this via URL's.  However, several vendors do not allow for specifying userid information via the URL's.

If you review the iReports reporting package, they allow for a separate prompt for userid and password along with the information connection information.

This should be quite simple to implement.

How to repeat:
1) Download and install Firebird Database and install schema from somewhere.  
2) Download and install Jaybird JDBC
3) Install the Jaybird JDBC files either into the correct location or add to classpath
4) Launch the MySQL Migration Toolkit
5) Setup the Jaybird JDBC Generic JDBC Connection (note that there is no where to specify Userid and Password)
6) Attempt to connect, which you can't

Cry miserably until you can't anymore ;)

TheWitness
The Cacti Group
www.cacti.net

Suggested fix:
Simply add two fields to the generic JDBC form.  The first for userid and the second for password.

Then, when connecting, utilize the following connection syntax (from Jaybird documentation):

"A typical use of the FBDriver class would use code something like this:

Class.forName("org.firebirdsql.jdbc.FBDriver");
Connection conn = DriverManager.getConnection("jdbc:firebirdsql:localhost/3050:/firebird/test.gdb", "sysdba", "masterkey");

Or in windows:

DriverManager.getConnection("jdbc:firebirdsql:localhost/3050:E:\\database\\carwash.gdb", "sysdba", "masterkey");"

In this case "sysdba" is the userid, and "masterkey" is the password.  The first parameter is the connection URL.
[20 May 2006 15:07] Larry Adams
This would appear to be a start.  I will test on a production box...  Need more documentation...

Attachment: RdbmsInfoGeneric.lua (application/octet-stream, text), 4.94 KiB.

[22 May 2006 11:03] Larry Adams
Ok, so now I know somewhat how to modify the toolkit.  I downloaded and install Eclipse, and modified the lua file and created a custom Java file to handle the translations.

Now, I can get most of the data in using the getSimpleDatatypes from the generic script.  However, when I try to utilize a modified version utilizing the handler included in both the MSSQL and Oracle lua files, I keep getting back 0 datatypes :(.

I think you can close this ticket.  I will goto the forums and when done with datatypes and triggers, I will submit to the MySQL team for inclusion.

TheWitness
[24 May 2006 0:44] Larry Adams
Lua file demonstrating file path and user/password

Attachment: RdbmsInfoFirebird.lua (application/octet-stream, text), 9.32 KiB.

[24 May 2006 0:46] Larry Adams
Current Status of Reverse Engineering.  Based upon Generic

Attachment: ReverseEngineeringFirebird.java (text/java), 20.26 KiB.

[24 May 2006 0:46] Larry Adams
Migration Utility Current Progress

Attachment: MigrationFirebird.java (text/java), 70.00 KiB.

[24 May 2006 0:48] Larry Adams
Miguel,

The attached files represent my progress to date.  I plan to implement Trigger support. I am not concerning myself with Views, SP's or SEQUENCE/GENERATORS though.  I will post up tile that level of support.  I can't test the others in that I don't have a database, or the time to test.

TheWitness
[29 Jun 2006 19:16] Michael G. Zinner
I have added the explicit username and password fields to the generic connection settings.

Further I have fixed the open issues that prevented the Firebird migration with the generic migration module.

It is now possible to do a migration from Firebird.
[29 Jun 2006 19:16] Michael G. Zinner
These changes will be included in the new 1.1 release tomorrow.