Making a simple MySQL client in NetBeans (where is the db node?)

View: New views
4 Messages — Rating Filter:   Alert me  

Making a simple MySQL client in NetBeans (where is the db node?)

by Thufir :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have my db, COFFEEBREAK, all set up:


thufir@arrakis:~$
thufir@arrakis:~$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 5.0.51a-3ubuntu5.1 (Ubuntu)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| COFFEEBREAK        |
| emotherearth       |
| feed_on_feeds      |
| mysql              |
+--------------------+
5 rows in set (0.00 sec)

mysql>
mysql> quit
Bye
thufir@arrakis:~$
thufir@arrakis:~$


Now, I just want to add the db to netbeans:



"You will find "Databases" node here. open this node..."

http://www.netbeans.org/kb/articles/mysql-client.html


How do I get the node?  



thanks,

Thufir


Connecting to a MySQL Database in NetBeans IDE

by Thufir :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sat, 05 Jul 2008 06:00:29 +0000, thufir wrote:

> Now, I just want to add the db to netbeans:
>
>
>
> "You will find "Databases" node here. open this node..."
>
> http://www.netbeans.org/kb/articles/mysql-client.html
>
>
> How do I get the node?



Ok, I was referencing the wrong manual:


"Adding the Driver to the IDE

In order to allow NetBeans IDE to communicate with a database, you need
to employ a Java-based driver. Generally speaking, drivers in NetBeans
IDE use the JDBC (Java Database Connectivity) API to communicate with
databases supporting SQL. The JDBC API is contained in the java.sql Java
package. A driver therefore serves as an interface that converts JDBC
calls directly or indirectly into a specific database protocol.

In this tutorial, you are using the MySQL Connector/J driver, which is a
pure Java implementation of the JDBC API, and communicates directly with
the MySQL server using the MySQL protocol. To add the driver to the IDE:

   1. If you have just downloaded the driver, first extract it to a
location on your computer. Set the root directory to: C:\mysql-connector-
java-5.0.5.
   2. In the IDE, in the Database explorer from the Runtime window (Ctrl
+5) expand the Databases node and right-click the Drivers node. Choose
New Driver. The New JDBC Driver dialog opens."

http://www.netbeans.org/kb/55/mysql.html




I know that the MySQL driver is working because I have command line
output from the db.

When press "Ctrl+5" I get the "services" tab, which is devoid of the
Databases node.  I'm still looking but would appreciate any pointers in
adding or enabling that node.



thanks,

Thufir


Re: Connecting to a MySQL Database in NetBeans IDE

by Thufir :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sat, 05 Jul 2008 06:34:49 +0000, thufir wrote:


> I know that the MySQL driver is working because I have command line
> output from the db.
>
> When press "Ctrl+5" I get the "services" tab, which is devoid of the
> Databases node.  I'm still looking but would appreciate any pointers in
> adding or enabling that node.


I also found:

" UI Spec for a MySQL node under databases

Tracked by Issue 127539

We recently moved Java DB functionality to a node under Databases. This
spec proposes creating a new node for MySQL that also goes under
Databases.

This node does not appear by default. It will appear only if we detect a
running MySQL server on the local machine at the default port. "

http://wiki.netbeans.org/MySQLNodeUISpec


However, there's no explanation for a missing Databases node :(



-Thufir



Re: Connecting to a MySQL Database in NetBeans IDE

by Thufir :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sat, 05 Jul 2008 06:48:12 +0000, thufir wrote:


> This node does not appear by default. It will appear only if we detect a
> running MySQL server on the local machine at the default port. "
>
> http://wiki.netbeans.org/MySQLNodeUISpec


Made me feel a bit dense, but I never did see an explanation as to how to
get the Databases node to display:  it's a plug-in.  Anyhow, I eventually
found it.



-Thufir