I need to Insert something in the DB
. im using JDBC
as a connector, jython the script
, mysql
the DB and the script is running in CentOS
.
my code looks something like this:
from
com.android.monkeyrunner import MonkeyRunner, MonkeyDevice, MonkeyImage
from
com.ziclix.python.sql import zxJDBC
db=zxJDBC.connect("jdbc:mysql://XXX.XXX.XXX.XXX:3306/dbname","USER","PASSWORD","org.gjt.mm.mysql.Driver")
c=db.cursor() c.execute("INSERT INTO tablename values ('X','X','X')")
before that, I downloaded and decompressed the file from here (in the desktop)
I added the path to classpath by doing this
export PATH=/home/XX/Desktop/mysql-connector-java-5.1.22
and when I ran the script, it gave me this error
zxJDBC.DatabaseError.driver [org.gjt.mm.mysql.Driver]
not found
what have I done wrong? is the name of the driver name correct? because I just copied it in one of the tutorials that I've seen. or probably did I install the driver correctly?
Thanks.