I rant against Oracle products a lot in this blog, but I have to admit I actually like a few of their products. One of them is SQL Developer. Strangely though, the feature I kind of like best is that SQL Developer can connect to non-Oracle databases like MySQL. This makes it a handy little multi-database GUI — you can have sessions in one UI open against different vendors’ databases.
But, like so much Oracle software, it doesn’t quite work the way you’d like right out of the box. There is a screen where you can configure a MySQL connection, but there is no driver included to actually make the MySQL connection.
I assume it’s a legal issue because, even though SQL Developer is free, it’s not open source. But the MySQL JDBC connector is very much open source covered by the GPL. I don’t think Oracle could distribute the connector unless they made SQL Developer open source as well.
Setting it up
First, download the version of the connector you want from the MySQL site. Unzip and place the JAR file in whatever directory you want. I just drag it into the SQL Developer folder so everything stays together in one place.
Now start SQL Developer and click on the Tools:Preferences menu; this should open the Preferences dialog box.
Click on the Add Entry button, which brings up a Select Path Entry dialog box. Navigate to wherever you’ve stored the JAR file and select it to load into Preferences.
Now you can set up connections to Oracle and MySQL databases. That’s it — easy peasy.