You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/04/29 05:26:28 UTC

[GitHub] [shardingsphere] huntunshule commented on issue #5375: How do I connect sharding-proxy in the springboot project?

huntunshule commented on issue #5375:
URL: https://github.com/apache/shardingsphere/issues/5375#issuecomment-620995046


   > 1. config and start sharding-proxy like above link
   > 2. use jdbc connecting to sharding-proxy just as a real mysql server
   
   I have almost followed the steps you mentioned, but there is the following error
   ```
    2020-04-29 13:25:03.834 ERROR 7960 [] [main] com.alibaba.druid.pool.DruidDataSource init datasource error, url: jdbc:mysql://192.168.1.211:3312/cloud-master?useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8
   
   java.sql.SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
   	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:110)
   	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
   	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)
   	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63)
   	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:73)
   	at com.mysql.cj.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:906)
   	at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:831)
   	at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:456)
   	at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:246)
   	at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:197)
   	at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:156)
   	at com.alibaba.druid.filter.FilterAdapter.connection_connect(FilterAdapter.java:787)
   	at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:150)
   ...
    ERROR 7960 [] [main] com.alibaba.druid.pool.DruidDataSource {dataSource-1} init error
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org