sqlline a java based console program allows you to connect to any database with existing jdbc drivers replacing the original programs like mysql, sqlplus or psql.
Example to connect to an oracle database with sqlline:
$ java -cp ~/path/classpath/classes12.jar:/usr/share/java/sqlline.jar sqlline.SqlLine sqlline version 1.0.2 by Marc Prud'hommeaux sqlline> !connect jdbc:oracle:thin:@hostname:1521:xe USER PASS Connecting to jdbc:oracle:thin:@hostname:1521:xe Connected to: Oracle (version Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production) 2: jdbc:oracle:thin:@hostname:1521:xe>