If I'm correctly understanding what you're trying to do, the problem is with "localhost". You're trying to connect to the external database from within your Android environment. Android is running Linux underneath, so you've got an operating system there, and localhost to that OS means the Android device. What your code says to do is open port 3306 on the Android device. You'll need to give the IP address of your external host to connect to it from Android.
I run It with the Emulator on the one same machine. I indeed have to specify the IP of my PC there as for Android the Emulator is "localhost". But that is not the main problem. There is an error message "Conversion to Davlink format failed with error1". I supose this is the error which is caused because the compilation fails when i should rework "mysql-connector-java-5.1.13-bin.jar" into the Davlink format.
However you must see what other java jar files those may further depend on. Also the android java sdk is a smaller subset of the full java sdk. So if the external jar is using some classes that don't exist in android jar then they will fail.