cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Connection to mysql database

EM_9394924
5-Regular Member

Connection to mysql database

I am trying to connect to a database but it's not working. I downloaded the mysql connector (sqljdbc42.jar) and I put it in the tomcat/lib folder. The configuration is like this:

 

com.mysql.jdbc.Driver

jdbc:mysql:/ip:3306/thingworx?user=x&password=x

 

Do you know how to fix this? Thankyou!

1 ACCEPTED SOLUTION

Accepted Solutions
anarwal
12-Amethyst
(To:EM_9394924)

HI @EM_9394924 , Which documentation you are following ?. Have you tried https://www.ptc.com/en/support/article/CS243088 

View solution in original post

10 REPLIES 10
anarwal
12-Amethyst
(To:EM_9394924)

Hi @EM_9394924 , First you need to check the connectivity between platform and the database server . Try ping to database ip from platform server . If that got success check for error logs in Application.logs in ThingworxStorage/logs folder

EM_9394924
5-Regular Member
(To:anarwal)

Thankyou, I didnt knew about this logs. I found this error:

ERROR starting: JDBC Driver Class Not Found: com.mysql.jdbc.Driver

Do I need to rename the jar file to "com.mysql.jdbc.Driver" ?

anarwal
12-Amethyst
(To:EM_9394924)

HI @EM_9394924 , Which documentation you are following ?. Have you tried https://www.ptc.com/en/support/article/CS243088 

View solution in original post

EM_9394924
5-Regular Member
(To:anarwal)

Hi @anarwal , I didn't knew about this guide, I am trying to follow it now and I will tell you if it works. Thankyou very much !

EM_9394924
5-Regular Member
(To:anarwal)

Do you know where is "JdbcCreator mashup" ? I can't find it.

anarwal
12-Amethyst
(To:EM_9394924)

When you import the extension you can find this in mashup section of the composer
EM_9394924
5-Regular Member
(To:anarwal)

I am a little confused because I learned that Mashup is under 'Vizualization' and is used to display data.

Hello @EM_9394924 ,

 

Maybe the extension has not been updated in a while and the driver is old.
There is a thread about packaging a new jdbc driver.
https://community.ptc.com/t5/ThingWorx-Developers/Using-a-third-party-Jar-file-for-Database-connecti...

 

Hope it helps,

 

EM_9394924
5-Regular Member
(To:Ciprian-Traian)

Should there be a button "JdbcCreator" ?

EM_9394924
5-Regular Member
(To:EM_9394924)

I've managed to import the extension. I was using the wrong driver.

Announcements