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