Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2007

Tip: Looking for answers? Try searching our database.

JDBC and IPv6?

Thread view: 
spacerook@gmail.com - 12 Apr 2007 17:04 GMT
Has anyone ever made a JDBC connection using an IPv6 URL?  I am
setting my URL like so (the address here is fake):

jdbc:mysql://[1111:2222:3333:4444:5555:6666:7777:8888]/mysql

This results in the following error:

Cannot get connection for URL jdbc:mysql://
[1111:2222:3333:4444:5555:6666:7777:8888]/mysql : Illegal connection
port value ':5555:6666:7777:8888]'

I am trying to connect to a MySQL database and am using the MySQL
drivers.  The Java program is on a Windows machine, which has IPv6
enabled and can successfully make a IPv6 ping (using ping6) to the
MySQL server.  I'm starting Java with -
Djava.net.preferIPv6Addresses=true, which seems to have had no effect.
Greg R. Broderick - 12 Apr 2007 20:48 GMT
spacerook@gmail.com wrote in news:1176393880.951063.227550
@n59g2000hsh.googlegroups.com:

> Has anyone ever made a JDBC connection using an IPv6 URL?  I am
> setting my URL like so (the address here is fake):
[quoted text clipped - 12 lines]
> MySQL server.  I'm starting Java with -
> Djava.net.preferIPv6Addresses=true, which seems to have had no effect.

What happens when you use a fully-qualified domain name that resolves to the
IPv6 IP address via DNS?

I'd also recommend removing the square brackets surrounding the IPv6 address
in the URL.

Cheers!

Signature

---------------------------------------------------------------------
Greg R. Broderick            gregb+usenet200612@blackholio.dyndns.org

A. Top posters.
Q. What is the most annoying thing on Usenet?
---------------------------------------------------------------------

Gordon Beaton - 13 Apr 2007 07:04 GMT
> I'd also recommend removing the square brackets surrounding the IPv6
> address in the URL.

The square brackets are there to indicate that the URL contains an
IPv6 literal address.

See rfc2732 (http://www.ietf.org/rfc/rfc2732.txt).

/gordon

--
spacerook@gmail.com - 13 Apr 2007 15:24 GMT
On Apr 12, 3:48 pm, "Greg R. Broderick" <gregb
+usenet200...@blackholio.dyndns.org> wrote:
> spacer...@gmail.com wrote in news:1176393880.951063.227550
> @n59g2000hsh.googlegroups.com:
[quoted text clipped - 23 lines]
>
> Cheers!

This seems to be morphing into more of a MySQL problem now...

I added an IPv6 address/hostname to my Windows host file.  I can use
ping6 on the hostname and it works.  Good.  But I am now getting a
"Connection Refused" exception when trying to connect to the MySQL
server on the Linux machine.

I tried some experiments on the MySQL Linux box.  This command works:

mysql -h 127.0.0.1

But this command gives an error:

mysql -h ::1
"Unknown MySQL Server host '::1'"

I think if I can get that second statement to work (i.e. get the MySQL
server to recognize IPv6 addresses), my problem will be solved.
CsuElites - 13 Apr 2007 16:39 GMT
> > > jdbc:mysql://[1111:2222:3333:4444:5555:6666:7777:8888]/mysql

Today ,for the first time ,i konw the format of IPV6 address.Thanks!
a24900@googlemail.com - 12 Apr 2007 22:39 GMT
On Apr 12, 6:04 pm, spacer...@gmail.com wrote:
> Has anyone ever made a JDBC connection using an IPv6 URL?  I am
> setting my URL like so (the address here is fake):
>
> jdbc:mysql://[1111:2222:3333:4444:5555:6666:7777:8888]/mysql

My understanding is that mysql's jdbc driver can't handle the numeric
IPv6 address (postgress has a patched driver which can). mysql should
work with a domain name, resolved to an IPv6 address. You don't have
to put the IPv6 address into a DNS server to get it resolved. Putting
the mapping into the local "hosts" file (on systems with a resolver
which uses the file, too) should do.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.