使用java连接到IPv6 mysql

使用java连接到IPv6 mysql,java,Java,我正在使用org.springframework.version->3.1.0.RELEASE,我的数据源如下所示 <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close" scope="prototype"> <property name="driverClassName" value="${jdbc.driverClassName}"/> &

我正在使用org.springframework.version->3.1.0.RELEASE,我的数据源如下所示

<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close" scope="prototype">
<property name="driverClassName" value="${jdbc.driverClassName}"/>
<property name="username" value="test"/>
<property name="password" value="test123"/>
<property name="maxActive" value="100"/>
<property name="maxIdle" value="30"/>
<property name="maxWait" value="16000"/>
<property name="timeBetweenEvictionRunsMillis" value="30000"/>
<property name="minEvictableIdleTimeMillis" value="60000"/>
<property name="testOnBorrow" value="true"/>
<property name="validationQuery" value="SELECT 1"/>
</bean>
我搜索了这个url并建议连接到IPv6地址。我可以通过DriverManager.getConnection进行连接,但不能通过此数据源进行连接……我是否遗漏了任何内容

Exception
Caused by: java.net.UnknownHostException: address=(protocol=tcp)(host=xx.xx.xx.xx)
at java.net.InetAddress.getAllByName0(InetAddress.jav a:1215)
at java.net.InetAddress.getAllByName(InetAddress.java :1127)
at java.net.InetAddress.getAllByName(InetAddress.java :1063)
at com.mysql.jdbc.StandardSocketFactory.connect(Stand ardSocketFactory.java:243)

我正在使用Centos-6.2 x86_64,我已检查了/etc/hosts,一切正常。

请过目。。。。它谈到了为ipv6My.cnf配置MySQL以允许ipv6[mysqld]bind_address=::并且跳过网络不在my.cnf我已经配置了MySQL,并且我可以使用-h从另一个系统连接到my MySQL。根据上面给出的Java代码,我无法连接到MySQL。它抛开了期待。
Exception
Caused by: java.net.UnknownHostException: address=(protocol=tcp)(host=xx.xx.xx.xx)
at java.net.InetAddress.getAllByName0(InetAddress.jav a:1215)
at java.net.InetAddress.getAllByName(InetAddress.java :1127)
at java.net.InetAddress.getAllByName(InetAddress.java :1063)
at com.mysql.jdbc.StandardSocketFactory.connect(Stand ardSocketFactory.java:243)