How can I add a data source in the database tool window???

I've screwed around with this for over 1/2 hour and I still can't figure it out - which probably just means I'm stupid. But still, it seems that this should be a simple operation.

I'm using RubyMine 4.5.4 with a MySQL database. Everything is all hooked up and working fine. All I am trying to do is to use the Database Tool Window (DTW) to access my existing databases and for the life of me I cannot figure out how to do so. The documentation for this is essentially worthless because it doesn't tell me how to accomplish this simple task and it gives no examples of what one should enter in the various fields.

From the doc it  seems that I should be able to right-click in the DTW, select "Add Data Source" and then if I choose "Import from Project Files..." the IDE should automatically be able to glean this information from my project files (database.yml, I'm assuming). The first thing that goes wrong here is that there are "..." at the end of the menu option, which is supposed to indicate that a dialog box is forthcoming. But one never shows up; instead, a box just pops up that says "No data sources" found.

So I tried to select the "DB Data Source" option. But when I did it seems that that is geared towards JDBC, which I don't use. Am I supposed to enter something into the "Database URL" field? If so, what? I tried entering various things in there (along with filling out the User Name and Password fields) but the "Test Connection" button never gets enabled, so I can't use that to see if what I am entering works.

Can someone please tell me how to do this? This is sooo frustrating it's not even funny. It seems like a simple right-click and filling in a few fields should be all that is needed, instead of spending almost an hour trying to figure out what to do by googling the web and searching this forum.

Thanks,
Larry

5 comments
Comment actions Permalink

Hi there,

From the doc it  seems that I should be able to right-click in the DTW, select "Add Data Source" and then if I choose "Import from Project Files..." the IDE should automatically be able to glean this information from my project files (database.yml, I'm assuming). The first thing that goes wrong here is that there are "..." at the end of the menu option, which is supposed to indicate that a dialog box is forthcoming. But one never shows up; instead, a box just pops up that says "No data sources" found.

http://www.jetbrains.com/ruby/webhelp/import-data-sources-dialog.html

Doc clearly says how it works: "You can import the data definitions from Spring, Hibernate, JPA and Tomcat (context.xml) configuration files." Apparently it is JAVA oriented and does not support "database.yml" (unless docs are out of date). I guess you can file Feature Request ticket to the Issue Tracker if you think such support should be added to this IDE.

So I tried to select the "DB Data Source" option. But when I did it seems that that is geared towards JDBC, which I don't use.

But IDE uses it communicate to DB.

Am I supposed to enter something into the "Database URL" field?

Surprisingly "Yes". Who would though?


Generally speaking:

  1. Select your driver in "JDBC Driver Files" drop-down box. Download driver files if required
  2. Select appropriate value in "JDBC Driver Class" field (if required)
  3. Database URL -- if you click on arrow-down icon, you will see list of accepted formats -- choosing the one which seems the most suitable for you and typing your details replacing placeholders should cause no issues (I'm sure you will figure out what "server" or "db" would mean in this kind of URL "jdbc:jtds:sqlserver://server/db;user=userName;password=password" -- that's not for MySQL, but good enough for example purposes).
  4. Fill the rest of fields if required


Have a look at this blog entry -- it has screenshot with example connection to MySQL: http://blog.jetbrains.com/webide/2012/11/sql-support-and-database-tools/

Some other blog entries which you may find useful: http://blog.jetbrains.com/webide/tag/database/

0
Comment actions Permalink

Hi Andriy,

Regarding your saying "Doc clearly says how it works" - well, I looked at numerous places in the doc and I did not see the descripton that you referenced. Maybe you knew right where to look, but I did not. Sorry for being so stupid, but I did try.

You also say that "the IDE uses JDBC to communicate to DB." Maybe that is obvious to you, but I do not know what lies beneath the covers of this very complex software program. Again, my apologies for being so stupid. But even if I did know that, there are several JDBC options in that dropdown - again, how am I to know which one I should use?

Regarding your response to my question about wondering if I should put something in the Database URL field, and if so, what. Those of you who work on this product and know it like the back of your hand probably know what one should enter into each of the literally thousands of fields and options throughout the product, so I guess your response - Surprisingly "Yes". Who would though? - makes sense for experts. Again, I am sorry for being so stupid that I do not know this obvious answer.

Regarding your "Generally Speaking" points, specifically #3: Thank you for your confidence in even someone as dumb as myself being able to figure out what "server" or "db" means - it was much appreciated! The only problem is that there aren't any entries illustrating accepted formats in that listbox. In fact, the only thing in there is one entry containing just: "jdbc://" - which is obviously not enough for me and my limited intelligence.

A few other notes: I use the IDE at work, and there I have downloaded EAP version 5. In that version when I right-click on the Database Tool Window and select "Add > Import from sources...," it pops up a nice dialog box with all of the entries from my database.yml file. I was hoping to see that kind of behavior in my version at home (4.5.4), but I did not - hence my post. And for the version at work I did not have to specify anything JDBC-related, which was another reason for my post.

I have been using your product for over 3 years and have almost 200 posts. If you look at them you will find that in probably 80% - 90% of the time I have said very nice things about your IDE and support. I have also taken the time to submit bug reports when I have found something wrong.

I'm really sorry a long-standing customer who really likes your product wasted your time with such an obviously stupid question.

0
Comment actions Permalink

To start wih -- I've no ralation to JetBrains -- just ordinary user as you are :). So everything here is just my personal time-wasting. And i'm not an expert in DB support in IDEA products -- used it only once (just to see what it is about), had problems with obtaining correct driver (I'm working with SQL Server and when I was trying it (quite some time ago) it did not had links for SQL Server drivers .. so I had to look for them myself).. then with connecting to DB (as official driver from Microsoft did not worked for me at all -- had to search for alternatives). In the end -- it's too different to official tool (quite inconvenient for my taste), that I did not started using it. That's about my "DB support" experience here.

Regarding your saying "Doc clearly says how it works"

Well -- I just searched help for that dialog window (or just pressed Help button in it, don't remember) and that was the page I saw first.

You also say that "the IDE uses JDBC to communicate to DB." Maybe that is obvious to you, but I do not know what lies beneath the covers of this very complex software program

And? TBH I do not think that user really need to know how it works behind the scene as long as software product guides you trough -- which I believe it does it ok in this particular moment (selecting and obtaining driver). Dialog window shows you list of options (list of drivers for specific database). Once you select one it offers you to download required files. That's it. Even if you do not know what that is or how it works ... the process/dialog designed in such way that you should easily be able to see what's required next. If you find it not straight forward/over complicated then I suggest posting Feature Request with your ideas. (P.S. AFAIK drivers cannot be bundled for licensing reasons.)

Regarding your response to my question about wondering if I should put something in the Database URL field

Well -- if it did not import anything already on your previous dialog screen (import stuff), then I do strongly believe that in such case such crucial piece of information as database details needs to be provided here.

Regarding your "Generally Speaking" points, specifically #3: Thank you for your confidence in even someone as dumb as myself being able to figure out what "server" or "db" means - it was much appreciated!

Well -- you asked if you need to enter anything there -- so I though I will give you some further hints, which apparently was unnecessary as you are definitely capable of figuring it out (but then I just followed the common trend in documentation area (noticed in many programming-related products) -- explain the obvious and let users figure out advanced stuff themselves).

But I'm glad that you have good sense of humor and noticed my sarcasm tone :)

The only problem is that there aren't any entries illustrating accepted formats in that listbox. In fact, the only thing in there is one entry containing just: "jdbc://" - which is obviously not enough for me and my limited intelligence.

Once you select what driver to use, the list will be populated. For example:
screen01.png

But I have to agree -- choosing correct format can be problematic sometimes (at least for SQL Server -- the official driver has 2 different formats, and only one of them appears to be working -- in newer version -- don't know about other drivers/engines).

I do also agree that help pages on it's own is not enough -- it desperately lacks real-life examples. And surprisingly they do not have any good  "How To" section -- lots of "How To's" published in blog .. but 1) no easy-to-use and centralised place 2) who would think searching in blogs in first place (unless you subscribed to the feed or checking it from time to time). They do have videos that explain features and how it can be used .. but still -- not easy to navigate inside + you have to find it first.

I was hoping to see that kind of behavior in my version at home (4.5.4), but I did not - hence my post. And for the version at work I did not have to specify anything JDBC-related, which was another reason for my post.

Improvements are always good -- easier for end users.

P.S.
Thanks for your detailed reply with nice touch of humor (at leats that's how I saw it).

0
Comment actions Permalink

Hi Andriy,

Wow - with that many posts I just assumed that you worked for JetBrains. That is awfully nice of you to take so much time to type these things and include links and screenshots as well! Constructing a post with related material is not a quick and easy thing to do, so you are to be commended for your actions.

It would be easier for me to say I was only joking with some of my responses (and I now wish I had been). But that would not be true, so I won't take the easy way out. I was upset with some of the responses because I thought they were "official" ones from a JetBrains employee, not from a fellow devleoper just trying to be a good guy. Which you are.

I apologize for some of my snide responses. Thanks for taking the time to offer your help.

-- Larry

0
Comment actions Permalink

All (or almost all) JB staff will either have special icon overlay (JB) over avatar .. or have "JetBrains" as part of their name. Plus .. their responses are always user-friendly and polite ( ... or no response at all (which is rare, but happens from time to time -- we all humans here and can overlook some moments), when corresponding dev is busy with actual coding... )

0

Please sign in to leave a comment.