I have been solving a problem with MYSQL and Jython for the past two days.
I keep receiving the error:
zxJDBC.DatabaseError: Communication failure during handshake. Is there a server running on localhost:3306? [SQLCode: 0]
I have tried out multiple solutions:
1.) Changing the port number of mysql
2.) Tried out variations of connection methods
However, none have worked so far.
My netstat shows that there is indeed a server running on port 3306 :
0.0.0.0 3306 c:\\xampp\\mysql\\bin\\mysqld.exe
My code goes as:
from com.ziclix.python.sql import zxJDBC
userInfo = {'user':'root', 'password':'', 'databaseName':'amda','serverName':'localhost','port':3306}
dbconnection = zxJDBC.connectx("org.gjt.mm.mysql.MysqlDataSource", **userInfo)
If you can, please help! Many thanks!
You might wanna go through this thread.
MySQL Forum
It is a similar error
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.