cancel
Showing results for 
Search instead for 
Did you mean: 

mySQL connection error

Former Member
0 Kudos

Hi,

  I am trying to connect mySQL database at receiver end and getting mysql syntax error exception..

JDBC Driver :  com.mysql.jdbc.Driver

Connection: jdbc:mysql://<hostname>:3306/test

and deployed following jar file - mysql-connector-java-5.1.21-bin.jar  (this is the latest jar is availble in mysql.com / our mysql version is 5.1.57)

added following parameters in provider.xml file -

<jar-name>lib/mysql-connector-java-5.1.21-bin.jar</jar-name>

receiver jdbc comm channel error is - mysql syntax error exception.

please see the attached screen shot error for more details error.

I checked host and port connection are working file both the end.

My concern is jar filename whatever I added in provider.xml file is it correct. because that is the jar file I download and deployed and same .jar file got added in provider.xml file.

Please help.

Accepted Solutions (1)

Accepted Solutions (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Can I know what is your PI version?

Former Member
0 Kudos

PI 7.31 only java stack

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Technically speaking your current jar should be compatible to work in PI 7.31 which runs jdk 1.5+.  But you can also give a try with the jdbc driver version mysql-connector-java-5.0.7-bin.jar and see if that helps.

http://www.herongyang.com/JDBC/MySQL-JDBC-Driver.html

http://www.herongyang.com/JDBC/Summary-JDBC-Drivers.html

Former Member
0 Kudos

as of now I have JDK 1.6 and I am trying to install jdk 1.5 also as per mysql document saying need to have 1.5 and 1.6

For Connector/J 5.1, you must have both JDK-1.6.x and JDK-1.5.x installed to be able to build the source code

let me try...

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>as of now I have JDK 1.6 and I am trying to install jdk 1.5 also as per mysql document saying need to have 1.5 and 1.6

I think you can still stay with jdk 1.6 for  PI and you might just change only jdbc driver version and try how that helps.

Former Member
0 Kudos

now I will try with this jar  - mysql-connector-java-5.0.8-bin.jar , because this is old jar exits in mysql for sql 5.1

Former Member
0 Kudos

looks like both the drivers are fine..I tested using sample java program.

I went to externarl definition in ESR and trying to import table structure, it showing me list of mysql database tables and when I select the table it is throwing me error -  "

Error occurred while attempting to connect to database

See error logs for details"

and attached commchannel error, if there is a driver problem how do I get list of mysql tables..I assume connection is fine.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Check whether your user login for the database is not allowed to access schema object. Please check with DBA.

Former Member
0 Kudos

Thanks for your response..let me check with DBA team and I will update.

Former Member
0 Kudos

I think problem with mysql is not supportig through external definition for data import.

I ran the developmet and data inserted into mysql.

NataliaGlants
Explorer
0 Kudos

Hi.

I had the same problem.

Add please the parameter to your URL:

jdbc:mysql://<host>/<DBName>?sessionVariables=sql_Mode=ANSI

Regars, Natalia.

Answers (0)