Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
While I am trying to connect with database through jython, I am getting
exception "unable to instantiate datasource" in line mysqlConn =
zxJDBC.connectx(url, user, password, driver,CHARSET='iso_1')
My piece of code is :
from com.ziclix.python.sql import zxJDBC
url = 'jdbc:mysql://localhost/test'
user = 'test'
password = 'pass123'
driver = 'org.gjt.mm.mysql.Driver'
mysqlConn = zxJDBC.connectx(url, user, password, driver,CHARSET='iso_1')
if mysqlConn is not None:
print "Successfully connected"
print "Not able to connect with database"
I have installed mysql-connector-java-5.1.13-bin.jar too and included that in
my classpath.Any clue why I am getting this error?
Although you're using it from Python/Jython, you're not actually using the
MySQLdb driver that exists in this project. You actually want the JDBC driver