Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » EGL Development Tools » MySQL table access (Cannot see MySQL Table from connection)
MySQL table access [message #893322] Tue, 03 July 2012 14:35 Go to next message
Nathan Reed is currently offline Nathan ReedFriend
Messages: 74
Registered: June 2012
Member
Windows XP
New install of EDT
RichUI application
MySQL DB & Workbench

I have used the MySQL workbench to create a simple table (processormaster) with a few columns in a schema named pinstruc.

I have finally been able to establish a connection via the Deployment Descriptor. I can ping with success. In the SQL Database Binding I have selected "Use A Connection Profile" and selected the one and only profile i have created.

When I try to create a record part or a service part the wizard forces me select a connection. I select the only connection I have created. It then wants me to select a table. The table I have created does not show. It shows no tables.

I have opened the Database Development perspective to try and discover my issue. I can see my connection and I can ping successfully. I see the schema I created (PINSTRUC). But my table does not appear. No tables appear.

In the data source explorer I see the following hierarchy:

New MYSQL (my connection)
PINSTRUC (I assume this is the database? I must have created this but do not recall doing it.)
Schemas
PINSTRUC (I created this Schema)
Tables (Empty)

In the MySQL workbench I am able to use a connection to access schema pinstruc and can open table processormaster.

I am out of things to check. Can anyone offer suggestions as to what my problem is?

Thx,

Nathan Reed
Re: MySQL table access [message #893345 is a reply to message #893322] Tue, 03 July 2012 16:02 Go to previous messageGo to next message
Justin Spadea is currently offline Justin SpadeaFriend
Messages: 66
Registered: July 2009
Member
Hi Nathan,

I found this which might help, but it doesn't sound very promising. Looks like the data tools team is lacking someone with MySQL expertise. http://www.eclipse.org/forums/index.php/m/657761/

It does sound like applications execute fine, it's just the UI tooling that can't see the tables. Maybe you could define the table in another database like derby so that you can use the record or service wizard to spit out the EGL code for you, then switch your binding in the DD back to your MySQL connection profile.

-Justin
Re: MySQL table access [message #893372 is a reply to message #893345] Tue, 03 July 2012 17:53 Go to previous messageGo to next message
Nathan Reed is currently offline Nathan ReedFriend
Messages: 74
Registered: June 2012
Member
Justin:

Thx for the input. Read the post you provided.

Noted in the post that Brian Payton indicated you must provide the database name in both the database field and the url or a bug prevents tables from showing.

I have tried every variation of syntax I can come up with and cannot ping the db when i provide the db name in the url. The following works (except it does not show the tables on the connection as Brian indicated in the post):

jdbc:mysql://localhost:3306

The following fail:

jdbc:mysql//localhost:3306/database=pinstruc (the wizard defaults to this syntax)

jdbc:mysql//localhost:3306/databasename=pinstruc
jdbc:mysql//localhost:3306;databasename=pinstruc

Is there some syntax I am getting wrong?

Am I discovering that MySQL is not supported in EDT?

If it is not supported then I can just move on and quit wasting everyones time. I would just simply like to know if it is supported or not. MySQL is a pretty common DB.

Is anyone accessing data from MySQL using edt egl?

I appreciate any input someone can provide.

Thx,

Nathan Reed

Re: MySQL table access [message #893399 is a reply to message #893372] Tue, 03 July 2012 21:32 Go to previous messageGo to next message
Richard Moulton is currently offline Richard MoultonFriend
Messages: 92
Registered: August 2011
Location: Devon, UK
Member
Nathan,

I don't want to rub salt in the wounds but I'm quite happily connecting to a MySQL DB from EDT. I'm connecting to a MySQL DB hosted by my ISP. The server version is 4.1.11 and I'm using the 5.0.8 MySQL connector (mysql-connector-java-5.0.8-bin.jar). I've built a simple RUI application over the DB and so far it all seems to work fine.

I'm quite a fan of the Database Development Perspective and do a lot of my SQL DB maintenance and adhoc querying through the tool including creating connection profiles. I also like the SQL scrapbook tool available within this perspective.

I can't think what might be causing your problem but if you still aren't getting any luck tomorrow let me know and I'll try and put together a simple walk through of creating a connection, a table, and a simple service.

Richard
Re: MySQL table access [message #893401 is a reply to message #893399] Tue, 03 July 2012 21:42 Go to previous messageGo to next message
Nathan Reed is currently offline Nathan ReedFriend
Messages: 74
Registered: June 2012
Member
Richard:

Thanks much.

I am working through the tutorial tonight which uses derby to try and figure out what I am doing wrong.

JDBC and tooling config are not my strong suits. Now that I know someone is able to access mysql I can work towards figuring out what I am doing wrong.

No salt in the wound.

Good to know it works.

Thx,

Nathan Reed
Re: MySQL table access [message #893481 is a reply to message #893401] Wed, 04 July 2012 10:24 Go to previous messageGo to next message
Nathan Reed is currently offline Nathan ReedFriend
Messages: 74
Registered: June 2012
Member
Richard:

I tried some things but made no progress. I am on version:

MySQL Server: 5.5.15
ConnectorJ: 5.1.16 and now have tried 5.1.21

Here is how I have my connection defined in the binding:

Database: pinstruc
URL: jdbc:mysql://localhost:3306
Username: root
Password: (correct password)

This will ping ok. Then when I go to the DB perspective I can see my connection and I can see my schema. But the table does not show.

I mentioned before that I found a comment in this forum that said if you do not include the database in the url a bug prevents tables from showing.

I am not able to include the database name in the url and ping the connection. Based on the details in the log I made an un-educated guess and removed the database from the url and ping the connection.

I am not sure of the proper syntax for including the database in the url but used the wizard default and others and cannot get a connection.

I do not have much experience with database development perspective but will try to work with my schema from there and see if i can determine any issues.

And suggestions would be welcome.

Thx,

Nathan Reed
Re: MySQL table access [message #893497 is a reply to message #893481] Wed, 04 July 2012 11:07 Go to previous messageGo to next message
Nathan Reed is currently offline Nathan ReedFriend
Messages: 74
Registered: June 2012
Member
Richard:

I tried using the database development perspective to create a table. Not sure I am doing it correctly and I do not know how to access log.

Cannot see the table I tried to create in mysql workbench.

Not sure how to save and access scrapbook.

I have exhausted my know how.

Thx,

Nathan Reed
Re: MySQL table access [message #894026 is a reply to message #893497] Fri, 06 July 2012 12:33 Go to previous messageGo to next message
Richard Moulton is currently offline Richard MoultonFriend
Messages: 92
Registered: August 2011
Location: Devon, UK
Member
Hi Nathan,

Sorry for the delay in getting back, I've not been monitoring the forum for updates. There's probably a setting somewhere that allows email notifications to be sent through for post updates.

Anyway, I've outlined below method that I've just tested and works for me. My guess is that your URL is wrong, note that the database name on the back end of the URL.

Let me know how you get on.

Richard



EDT 0.8M3

- Create a new workspace

- Switch to the database development perspective

- Click the new connection profile button

- Select connection profile type of MySQL, enter a name and click next

- Click the new driver definition button

- Select name/type of MySQL JDBC Driver 5.0, click the JAR List tab, click edit Jar/Zip and point to the mysql-connector-java-5.0.8-bin.jar file

- Back in the new connection profile wizard, on the general tab I enter my database name, url, user name and password, click the test connection button and get the success panel, click ok and click finish

In my case I enter the following ...
Database: mydatabase
URL: jdbc:mysql://myserver:3306/mydatabase

- My connection profile is then displayed under the database connections folder

- I can now double click on the connection profile to see my database (mydatabase), when I double click on this and then double click on schemas I can see my schema (mydatabase), double clicking on this and then tables shows me my list of tables

- My understanding is that database and schema are one and the same in MySQL

- Within the data source explorer view if I then select mydatabase and click the open scrapbook button I can then enter and excute the following command and it does create a table ... create table test (id int)


Re: MySQL table access [message #894050 is a reply to message #894026] Fri, 06 July 2012 13:46 Go to previous messageGo to next message
Nathan Reed is currently offline Nathan ReedFriend
Messages: 74
Registered: June 2012
Member
Richard:

That fixed it.

I misunderstood the post i found that referenced this issue. I did not get the point that the DB needs to be "In" the url. I was trying to put the DB notation on the same line as the url. Similar to how it is done in RBD.

Will now give it a workout and see how it goes but it looks fine so far.

Will be delighted when this DB connection stuff is abstracted out of sight. IBM has done great job of that with all the web tooling. Hope DB connection is on the list.

Thanks much,

Nathan Reed
Re: MySQL table access [message #894057 is a reply to message #894026] Fri, 06 July 2012 13:57 Go to previous messageGo to next message
Justin Spadea is currently offline Justin SpadeaFriend
Messages: 66
Registered: July 2009
Member
Richard,

Regarding email notifications, I've found that the forum software doesn't have very good options to be notified (I think it will only email you when someone replies to a thread you started or commented on). I use the RSS feed, which is built right into my browser so it was a snap to enable.

The feed URL is: http://www.eclipse.org/forums/feed.php?mode=m&l=1&basic=1&frm=190&n=10

-Justin
Re: MySQL table access [message #896568 is a reply to message #894057] Wed, 18 July 2012 23:16 Go to previous message
Richard Moulton is currently offline Richard MoultonFriend
Messages: 92
Registered: August 2011
Location: Devon, UK
Member
Justin,

The RSS reader was the way to go.

Thanks
Richard
Previous Topic:What happened to IRest?
Next Topic:mathLIb.round
Goto Forum:
  


Current Time: Wed Nov 06 18:59:43 GMT 2024

Powered by FUDForum. Page generated in 0.05051 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top