Reference site: http://blog.sina.com.cn/s/blog_537cc9ae0100dfjl.html
Configuration required after installation: MySQL classpath path
Linux files are configured in the way above
Windows file added in Jython.bat
set CLASSPATH=%_CP: "=%; C:\\jython2.5.2\\extlibs\\mysql-connector-java-5.1.6.jar;%classpath: "=%
Default configuration Method Reference:
Http://www.wangchao.net.cn/bbsdetail_1785738.html (Jython access to the MySQL database for specific steps)
Note that the MM Access class library is too old, download the latest Mysql-connector-java-5.1.6.jar instead, and JDBC default has been integrated does not need to be followed
Additional reference files during installation:
http://developer.51cto.com/art/200907/135818.htm (Jython access MySQL detailed steps)
Http://gang.blogbus.com/logs/36340217.html (Jython uses JDBC to connect to the database)
Http://www.cnblogs.com/harrychinese/archive/2012/08/17/Let_Jython_auto_load_some_jar.html (How to get Jython to load a jar package automatically)
Jython Connection Database code:
From Com.ziclix.python.sql import Zxjdbc
Mysqlconn = Zxjdbc.connect ("Jdbc:mysql://localhost/sign_cms", "Root", "" "," Com.mysql.jdbc.Driver ")
cursor = Mysqlconn.cursor ()
Cursor.execute ("SELECT * from about")
Cursor.fetchone () | Cursor.fetchall ()
Cursor.close ()
Mysqlconn.close ()