How to access an Openshift Mysql database via Jdbc via Google Spreadsheet?

Asked

Viewed 524 times

0

I want to access a Mysql database hosted in Openshift via Jdbc from Google Spreadsheet. It is possible?

In Google Spreadsheet, in Ferramentas -> Editor de Scripts, I am having problems with the connection string that is in this format:

var connection = Jdbc.getConnection(
    "jdbc:mysql://HOST:PORTA/DB_NAME", "USERPHPMYADMIN", "SENHAPHPMYADMIN");
  • 1

    What’s the problem ? where mysql has external access ?

  • mysql://URLDOOPENSHIFT:3306, what is the problem ?

  • David, welcome to [en.so]! Are there any error messages? Can you connect from another location? Try doing a simple program in Java, a Main class to make the connection and test to see if you can. As @Otto has already commented, you need to enable external access, because in Mysql by default it does not allow remote connection. So first check if the user used in getConnection has the appropriate permissions. Hug!

  • Okay, I’ll test it. Thank you so much for your help.

  • Well, I checked that the user I’m using to access mysql in openshift is root and therefore should have access to everything. I’ll rephrase the question: It is possible to remotely access a Mysql database hosted in Openshift?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.