How to connect database IPv6 under JDBC

Source: Internet
Author: User


How to connect database IPv6 under JDBC

Mysql:

IPv4 Driver URL:
Jdbc:mysql://127.0.0.1:3306/database
IPv6 Driver URL:

jdbc:mysql://address= (PROTOCOL=TCP) (HOST=FE80::A00:27FF:FEC3:87C7) (port=3306)/database

Driver requirements: The JDBC Connection driver needs to be greater than 5.1.31 above, I did not notice this problem, has been using the project on the Unified 5.1.6, so the configuration is correct, the Tomcat boot background will be wrong, prompted to connect not to the database port, and later to 5.1.44 to solve the problem.

Oracle:

ipv4 Driver url:  
         jdbc:oracle:thin:@//127.0.0.1:3306/ orcl  
ipv6 Driver url: 
        jdbc:o racle:thin:@ (description= 
                (address= (protocol= TCP) (host=[fe80::5cf:72]) (port=1521))  

(Connect_data= (SERVICE_NAME=FNSTDB1)))

Drive Requirements: ojdbc14+

Java uses JDBC IPv6 to connect to the database

How to connect database IPv6 under JDBC

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.