Skip to content

Instantly share code, notes, and snippets.

@Dwiga
Created December 27, 2017 11:53
Show Gist options
  • Save Dwiga/e7e39a0a51dc5daf2bd83be25ac2b447 to your computer and use it in GitHub Desktop.
Save Dwiga/e7e39a0a51dc5daf2bd83be25ac2b447 to your computer and use it in GitHub Desktop.
jython connection to mysql
import sys
import os
sys.path.append(os.path.dirname(os.path.realpath('__file__')) + "/python")
from com.ziclix.python.sql import zxJDBC
cnx = zxJDBC.connect("jdbc:mysql://localhost/yourdb", "username", "password", "org.gjt.mm.mysql.Driver")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment