Home » DbVisualizer Forums » DbVisualizer » DbVisualizer - Support

Thread: remote connection to single mysql database not showing tables

This question is answered.


Permlink Replies: 10 - Pages: 1 - Last Post: Jan 20, 2011 10:55 PM Last Post By: Matthew Welch
julievancouver

Posts: 8
Registered: 04/08/09
remote connection to single mysql database not showing tables
Posted: Apr 8, 2009 10:35 PM
 
   thread.click_reply Reply
I can connect remotely to a mysql database. I have specified in the connection string the database name.
I can successfully "show tables from <databasename>" in the sql window, but clicking on the "tables" link on the sidebar doesn't work because it is trying to do this: "show tables from `null`".
The database name shows up in the "object view" under "database".
How do I replace null with the database name in the object tree/sidebar area?
Thanks.
Roger Bjarevall


Posts: 5,042
Registered: 12/17/04
Re: remote connection to single mysql database not showing tables
Posted: Apr 8, 2009 10:37 PM    global.in_response_to.tooltip in response to: julievancouver
 
   thread.click_reply Reply
Hi,

What JDBC URL are you specifying, what version of MySQL and the JDBC driver?

What version of DbVisualizer?

Please send a screenshot of the Connection tab visible while connected.

Best Regards

Roger
julievancouver

Posts: 8
Registered: 04/08/09
Re: remote connection to single mysql database not showing tables
Posted: Apr 8, 2009 11:08 PM    global.in_response_to.tooltip in response to: Roger Bjarevall
 
   thread.click_reply Reply
 global.attachment db1.png (36.0 KB )
Hello,
I'm using the mySql JDBC Driver:
MySQL-AB JDBC Driver; mysql-connector-java-5.0.8 ( Revision: ${svn.Revision} )
DBVis version: 6.5.5
Database Product Version: 4.1.12-log
Here is my connection string:
jdbc:mysql://mysql.netfirms.com:3306/d60508168 (the connection is successful)
Attached is a screenshot of the left pane with object tree shown.
Thanks.
Julie
julievancouver

Posts: 8
Registered: 04/08/09
Re: remote connection to single mysql database not showing tables
Posted: Apr 8, 2009 11:10 PM    global.in_response_to.tooltip in response to: julievancouver
 
   thread.click_reply Reply
 global.attachment db2.png (68.0 KB )
... and a screenshot of the connections tab.
Thanks again.
Julie
julievancouver

Posts: 8
Registered: 04/08/09
Re: remote connection to single mysql database not showing tables
Posted: Apr 8, 2009 11:16 PM    global.in_response_to.tooltip in response to: julievancouver
 
   thread.click_reply Reply
 global.attachment db3.png (33.6 KB )
... and a screenshot of the error when clicking on "tables" in left nav bar.
Julie
Roger Bjarevall


Posts: 5,042
Registered: 12/17/04
Re: remote connection to single mysql database not showing tables
Posted: Apr 9, 2009 11:28 AM    global.in_response_to.tooltip in response to: julievancouver
Correct
   thread.click_reply Reply
Julie,

I suspect there may be an authorization issue preventing you from listing all databases available on the server.

What happen if you run the following in the DbVisualizer SQL Commander?

show databases

If it returns no result then please verify with the DBA whether my assumption is correct.

Best Regards

Roger
julievancouver

Posts: 8
Registered: 04/08/09
Re: remote connection to single mysql database not showing tables
Posted: Apr 9, 2009 7:08 PM    global.in_response_to.tooltip in response to: Roger Bjarevall
 
   thread.click_reply Reply
Hi Roger,
"show databases" returns no rows. Your assumption was correct -- thanks.
I guess I will have to live with using the sql commander to show tables.
I appreciate your prompt responses.
Cheers,
Julie
julievancouver

Posts: 8
Registered: 04/08/09
Re: remote connection to single mysql database not showing tables
Posted: Apr 9, 2009 7:09 PM    global.in_response_to.tooltip in response to: julievancouver
 
   thread.click_reply Reply
Many thanks Roger.
Roger Bjarevall


Posts: 5,042
Registered: 12/17/04
Re: remote connection to single mysql database not showing tables
Posted: Apr 10, 2009 9:35 AM    global.in_response_to.tooltip in response to: julievancouver
 
   thread.click_reply Reply
Julie,

I have attached a patched database profile for MySQL that will let you browse the default database only (as specified in the JDBC URL). Save it as:

DBVIS-HOME\resources\profiles\mysql-defaultdb.xml

Now start DbVisualizer and goto the Connection tab for the database connection which you don't have privileges to browse non default databases. Before connecting it click the "Profile" link in the status bar, it is "auto" by default. In the list select the "mysql-defaultdb", press Apply and connect. You should now see only the default database in the objects tree.

Note: this patched profile will not show any other databases then the one specified as default database. Make sure you are using the standard "mysql" profile when accessing DB servers for which you are granted "show databases" authorization.

Let me know the result.

Best Regards

Roger
Roger Bjarevall


Posts: 5,042
Registered: 12/17/04
Re: remote connection to single mysql database not showing tables
Posted: Mar 16, 2010 8:12 AM    global.in_response_to.tooltip in response to: Roger Bjarevall
 
   thread.click_reply Reply
Hi,

DbVisualizer 7.0.5 has just been released with a permanent fix for this.

What you need to do is to add a driver property:

SINGLE_DBNAME = <database>

Where <database> is the name of the database you are allowed to access.

With this property set only <database> will appear in the objects tree. This is especially useful if the MySQL server is configured to not allow listing all databases in the server.

Best Regards

Roger
Matthew Welch

Posts: 3
Registered: 04/10/06
Re: remote connection to single mysql database not showing tables
Posted: Jan 20, 2011 10:50 PM    global.in_response_to.tooltip in response to: Roger Bjarevall
 
   thread.click_reply Reply
I am having exactly the same problem described above however in my case when I use the SQL Commander to "show databases" it does work as expected and lists the databases. I've tried this on a bare bones fresh install of MySQL 5.1 and 5.5 using licensed copies of both DbVisualizer Personal 7.1.3 and 7.1.4.

Any advice?


Edit (10 minutes later): Ok, I guess you can ignore what I wrote above. For whatever reason, deleting that database connection and creating a new one, even using the exact same connection data, caused things to start working as expected. Bizarre, but hey, it works!

Point your RSS reader here for a feed of the latest messages in all forums