0

I recently set up an OpenShift project with the MySQL 5.5 cartridge.

Now I'm trying to reach this server. The DB name is 'wensput'.

The URL I'm trying to reach the MySQL is:
DB_URL = "jdbc:mysql://77.78.110.71:3306/Wensput"; AND DB_URL = "jdbc:mysql://IP/wensput"; WHERE IP = the IP my machine uses to connect to phpAdmin, also the 'Server' (something like: 127.9.203.293:3306

I tried them both with capatilazing and such but nothing seems to work. Now was my question, do I have the url right? Or do I need to use like, the rhcloud.com/phpmyadmin url? What am I doing wrong?

EDIT: **** I first get a java.lang.ClassNotFoundException: com.mysql.jdbc.Driver exception, but: there are no complains about 'CLASSPATH' whatsoever.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Ivar Reukers
  • 7,560
  • 9
  • 56
  • 99

1 Answers1

-1

Looks like you don't have the JDBC driver installed or are not importing it correctly. Take a look at this tutorial for detailed instructions: Connect Java to a MySQL database

Community
  • 1
  • 1
TheCatParty
  • 1,449
  • 12
  • 19
  • Although this answer has been downvoted, it was true, I didnt have the jdbc in my WEB-INF/lib but in 'external jars'. Sadly enough, now I can't connect to my username/pass are incorrect :/ – Ivar Reukers Oct 02 '15 at 19:10