0

is there a way that I could parse mysql console output to Java objects? I can almost see your answers suggesting me to use JDBC but mysql connection towards my system is closed. It only exists internally, in that system.

I can reach it through SSH which leaves me with parsing console outputs. Is there a known way of doing this or some other solution that I've overlooked?

esper
  • 125
  • 1
  • 9
  • asking for library is off the topic in stackoverflow.So delete your question before getting downvotes – SpringLearner Dec 19 '13 at 10:54
  • @JqueryLearner can you please back this statement with facts? I don't recall asking for a more elegant/smart way to achieve a goal being forbidden in StackOverflow, because that will drop almost 90% of questions in this platform. – thermz Dec 19 '13 at 10:59
  • @thermz click on flag ->it should be closed for another reason -> off topic because and you will see a list – SpringLearner Dec 19 '13 at 11:00
  • @JqueryLearner I read, and I actually thinks that maybe it's too harsh in this situation to focus on "library request". Probably the OP should have asked for a "way to solve a problem" instead of a "Library to solve a problem".. but IMHO I see no real reason to flag o downvote this question.. maybe a philosofical reason ☺ – thermz Dec 19 '13 at 11:11
  • @thermz Leave this for community to decide.I just gave my opinion to OP so that he will not loose reputations unnecessary. – SpringLearner Dec 19 '13 at 11:14
  • So... no one really has any answer or advice, you've just decided to argue about if the question should be asked here or not? – esper Dec 19 '13 at 11:17
  • IMHO It's a very weird situation! I would refuse to work with a Database without a connection towards the database! It's sick! Sometimes the real answer is "I can't work in these conditions" – thermz Dec 19 '13 at 11:21
  • yes, but the database is only one of the interfaces used on this system. and it's used only to retrieve limited set of informations about this system. but it's still there – esper Dec 19 '13 at 11:22
  • Give some example of what you're trying to achieve and some example code of what you've tried. THis is too broad of a question. If you don't agree on this, take another look at this: http://stackoverflow.com/help/dont-ask – Joris Meys Dec 19 '13 at 16:00

1 Answers1

1

Try to connect to your MySQL port (standard is 3306) with an ssh tunnel, but I really don't know if this options can work in your situation, I can't guarantee but it seems a good possibility for me.

It seems that JSch is the most common option in this situation for the Java part. But try to create the tunnel with command line before that.

The answer of Pascal Thivent maybe can help you out for this:

connect to remote mysql database through ssh using java

Community
  • 1
  • 1
thermz
  • 2,386
  • 3
  • 20
  • 28