NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Connecting mysql to netbeans 6.8

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
padjester



Joined: 14 Jul 2009
Posts: 33

PostPosted: Sat Jan 23, 2010 3:50 pm    Post subject: Connecting mysql to netbeans 6.8 Reply with quote

Hi

I have spent a whole day on trying to set up a connection from netbeans 6.8 to a mysql database. I would greatly appreciate it if someone can advise me on what I am doing wrong, or give any suggestons.

I have set up a mysql server instance, all went well. When I try to connect using the appropriate driver in the services window and put all my info in I get the following error:

" Unable to add connection. cannot establish a connection to jdbc:mysql://localhost:3306/DATABASENAME using com.mysql.jdbc.driver (unknown database 'DATABASENAME']. "

I enter the following information when trying to connect:

Driver name: MySql(Connector/J Driver)
Host: localhost
Port: 3306
Database: OHDB
User Name: I use root here
Password: I put my password in here

When I use this info I get the above mentioned error?

Any advice will be greatly appreciated.

padjester



Question
Back to top
dAlexis



Joined: 18 Jan 2010
Posts: 7

PostPosted: Mon Jan 25, 2010 8:15 am    Post subject: Reply with quote

It was seen... For me problem with connection was solved after reinstalling and partial(?) cleaning of parameters, left from previous NB versions. However, I found a next trap for myself:

[url]
http://forums.netbeans.org/viewtopic.php?t=22218&start=0&postdays=0&postorder=asc&highlight=[/url]

One question - please, point me to RTFM about complete NetBeans parameters cleaning while reinstall. Which directories|files must be cleaned? Maybe, my problems are caused by not complete cleaning.
Back to top
padjester



Joined: 14 Jul 2009
Posts: 33

PostPosted: Mon Jan 25, 2010 12:19 pm    Post subject: Reply with quote

Thank you - my problem is sorted Very Happy
Back to top
dAlexis



Joined: 18 Jan 2010
Posts: 7

PostPosted: Mon Jan 25, 2010 2:45 pm    Post subject: Reply with quote

padjester wrote:
Thank you - my problem is sorted Very Happy


May you tell me, which directories|parameters were cleared by you?
Back to top
padjester



Joined: 14 Jul 2009
Posts: 33

PostPosted: Mon Jan 25, 2010 5:45 pm    Post subject: Reply with quote

I confused the parameters regarding the set up of my connection in netbeans and the connection in mysql. I used different user names and passwords instead of the same ones to establish my connections.

Kind regards
padjester
Back to top
Alexander Schell
Posted via mailing list.





PostPosted: Wed Jan 27, 2010 11:34 am    Post subject: Connecting mysql to netbeans 6.8 Reply with quote

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello

Is 'jdbc:mysql://localhost:3306/DATABASENAME' the correct locator?

It seems that this databasename is not known. As far as I understand
your post you're using a database named 'OHDB' so the locator should
be 'jdbc:mysql://localhost:3306/OHDB'.

Best Regards

Alexander Schell

Am 24.01.2010 17:57, schrieb Don Millhofer:
Quote:
Hi padjester: have you set your web.xlm reference?

Don


padjester wrote:

Quote:
Hi

I have spent a whole day on trying to set up a connection from
netbeans 6.8 to a mysql database. I would greatly appreciate it if
someone can advise me on what I am doing wrong, or give any
suggestons.

I have set up a mysql server instance, all went well. When I try
to connect using the appropriate driver in the services window and
put all my info in I get the following error:

" Unable to add connection. cannot establish a connection to
jdbc:mysql://localhost:3306/DATABASENAME using
com.mysql.jdbc.driver (unknown database 'DATABASENAME']. "

I enter the following information when trying to connect:

Driver name: MySql(Connector/J Driver)
Host: localhost
Port: 3306
Database: OHDB
User Name: I use root here
Password: I put my password in here

When I use this info I get the above mentioned error?

Any advice will be greatly appreciated.

padjester



[Question]








-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAktci4gACgkQfkcoZSkNJQa5rACfSGBJHand1QIA4bCnmxo7Jkb1
lSsAoNTVMeCxPUjgd5J5fC17BHOxzEyB
=HN+5
-----END PGP SIGNATURE-----
Back to top
Oddvard Myrnes
Posted via mailing list.





PostPosted: Wed Jan 27, 2010 11:54 am    Post subject: Connecting mysql to netbeans 6.8 Reply with quote

Hi,

For us all: What was the soulution?

Oddvard

-----Original Message-----
From: padjester [mailto:address-removed]
Sent: Monday, January 25, 2010 1:19 PM
To: address-removed
Subject: [nbusers] Connecting mysql to netbeans 6.8


Thank you - my problem is sorted :D




This email has been verified by Google Postini filtering system
Back to top
Oddvard Myrnes
Posted via mailing list.





PostPosted: Wed Jan 27, 2010 11:54 am    Post subject: Connecting mysql to netbeans 6.8 Reply with quote

Hi,

If you use Tomcat then the jdbc driver has to be in the tomcat driver
library when you run outside of NB. So if you use Tomcat it depend on if you
run outside of NB or from within the NB IDE.

Oddvard

-----Original Message-----
From: padjester [mailto:address-removed]
Sent: Saturday, January 23, 2010 4:51 PM
To: address-removed
Subject: [nbusers] Connecting mysql to netbeans 6.8


Hi

I have spent a whole day on trying to set up a connection from netbeans 6.8
to a mysql database. I would greatly appreciate it if someone can advise me
on what I am doing wrong, or give any suggestons.

I have set up a mysql server instance, all went well. When I try to connect
using the appropriate driver in the services window and put all my info in I
get the following error:

" Unable to add connection. cannot establish a connection to
jdbc:mysql://localhost:3306/DATABASENAME using com.mysql.jdbc.driver
(unknown database 'DATABASENAME']. "

I enter the following information when trying to connect:

Driver name: MySql(Connector/J Driver)
Host: localhost
Port: 3306
Database: OHDB
User Name: I use root here
Password: I put my password in here

When I use this info I get the above mentioned error?

Any advice will be greatly appreciated.

padjester



[Question]




This email has been verified by Google Postini filtering system
Back to top
troy giunipero
Posted via mailing list.





PostPosted: Wed Jan 27, 2010 12:14 pm    Post subject: Connecting mysql to netbeans 6.8 Reply with quote

padjester wrote:
Quote:
Hi

I have spent a whole day on trying to set up a connection from netbeans 6.8 to a mysql database. I would greatly appreciate it if someone can advise me on what I am doing wrong, or give any suggestons.

I have set up a mysql server instance, all went well. When I try to connect using the appropriate driver in the services window and put all my info in I get the following error:

" Unable to add connection. cannot establish a connection to jdbc:mysql://localhost:3306/DATABASENAME using com.mysql.jdbc.driver (unknown database 'DATABASENAME']. "

Are you sure you've created a database instance named 'DATABASENAME'?
If the IDE shows that it's connected to your MySQL server, then you will
probably see Databases > MySQL Server at localhost:3306 [root] in the
Services window. If you expand this MySQL Server node, you'll see all
of the database instances that currently exist on the server. (If you
create an instance outside of the IDE, right-click the MySQL Server node
and choose Refresh.) Do you see an instance named 'DATABASENAME' there?

Note that you don't need to create database instances outside of the IDE
anyway. You can right-click the MySQL Server node and choose Create
Database. When you create a database instance this way, the IDE
automatically creates a connection node for you in the Services window.
Quote:
I enter the following information when trying to connect:

Driver name: MySql(Connector/J Driver)
Host: localhost
Port: 3306
Database: OHDB
User Name: I use root here
Password: I put my password in here


It looks like you're choosing 'Connect Using' from the right-click menu
of the MySQL driver node. You don't need to create a connection this
way. Instead, right-click one of the database instances listed under
your MySQL Server node and choose Connect.

hope this helps.

Quote:
When I use this info I get the above mentioned error?

Any advice will be greatly appreciated.

padjester



[Question]




Back to top
throwcode



Joined: 26 Dec 2008
Posts: 30

PostPosted: Wed Jan 27, 2010 12:14 pm    Post subject: Connecting mysql to netbeans 6.8 Reply with quote

Hi padjester: have you set your web.xlm reference?

Don


padjester wrote:

Quote:
Hi

I have spent a whole day on trying to set up a connection from netbeans 6.8 to a mysql database. I would greatly appreciate it if someone can advise me on what I am doing wrong, or give any suggestons.

I have set up a mysql server instance, all went well. When I try to connect using the appropriate driver in the services window and put all my info in I get the following error:

" Unable to add connection. cannot establish a connection to jdbc:mysql://localhost:3306/DATABASENAME using com.mysql.jdbc.driver (unknown database 'DATABASENAME']. "

I enter the following information when trying to connect:

Driver name: MySql(Connector/J Driver)
Host: localhost
Port: 3306
Database: OHDB
User Name: I use root here
Password: I put my password in here

When I use this info I get the above mentioned error?

Any advice will be greatly appreciated.

padjester



[Question]





Back to top
padjester



Joined: 14 Jul 2009
Posts: 33

PostPosted: Wed Jan 27, 2010 1:22 pm    Post subject: Reply with quote

Hi there

Thank you for all the replies I have fixed my problem as stated above.

Kind regards
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo