bai1986 opened a new issue #11388:
URL: https://github.com/apache/shardingsphere/issues/11388


   
   i connect  apache-shardingsphere-5.0.0-alpha-shardingsphere-proxy by mysql 
client (8.0.25) ,when i executed some command ,a error was reported: as follows
   mysql -uroot -proot -h10.0.0.1 -P 3307
   [email protected](sharding_db) 14:45>show tables;
   
   ERROR 2027 (HY000): Malformed packet
   No connection. Trying to reconnect...
   Connection id:    10
   Current database: sharding_db
   
   The version of mysql client :
   mysql  Ver 8.0.25 for Linux on x86_64 (MySQL Community Server - GPL)
   
   After some troubleshooting, it is suspected that the MySQL client version is 
not compatible with proxy。so  i replaced mysql client to
   /usr/local/mysql8020/bin/mysql --version
   /usr/local/mysql8020/bin/mysql  Ver 8.0.20 for Linux on x86_64 (MySQL 
Community Server - GPL)
   and 
   /root/mysql  Ver 14.14 Distrib 5.7.13, for linux-glibc2.5 (x86_64) using  
EditLine wrapper
   [email protected](sharding_db) 14:52>show tables;
   +---------------------+
   | Tables_in_demo_ds_1 |
   +---------------------+
   | t_no_shard          |
   | t_order             |
   | t_order_item        |
   +---------------------+
   The error described above did not recur 。
   
   Here are some of my main configurations,only the  datasource of the default 
config has been modified
   **server.xml**
   governance:
     name: governance_ds
     registryCenter:
       type: ZooKeeper
       serverLists: 10.0.0.1:2181
       props:
         retryIntervalMilliseconds: 500
         timeToLiveSeconds: 60
         maxRetries: 3
         operationTimeoutMilliseconds: 500
     overwrite: false
   authentication:
     users:
       root:
         password: root
       sharding:
         password: sharding
         authorizedSchemas: sharding_db
   
   props:
     max-connections-size-per-query: 1
     acceptor-size: 16  # The default value is available processors count * 2.
     executor-size: 16  # Infinite by default.
     proxy-frontend-flush-threshold: 128  # The default value is 128.
   
   **config-sharding.yaml**
   schemaName: sharding_db
   #
   dataSourceCommon:
     username: shardingsphere
     password: 123456
     connectionTimeoutMilliseconds: 30000
     idleTimeoutMilliseconds: 60000
     maxLifetimeMilliseconds: 1800000
     maxPoolSize: 50
     minPoolSize: 1
     maintenanceIntervalMilliseconds: 30000
   
   dataSources:
     ds_0:
       url: jdbc:mysql://10.0.0.2:3306/demo_ds_0?serverTimezone=UTC&useSSL=false
     ds_1:
       url: jdbc:mysql://10.0.0.2:3306/demo_ds_1?serverTimezone=UTC&useSSL=false
   
   rules:
   - !SHARDING
     tables:
       t_order:
         actualDataNodes: ds_${0..1}.t_order_${0..1}
         tableStrategy:
           standard:
             shardingColumn: order_id
             shardingAlgorithmName: t_order_inline
         keyGenerateStrategy:
           column: order_id
           keyGeneratorName: snowflake 
       t_order_item:
         actualDataNodes: ds_${0..1}.t_order_item_${0..1}
         tableStrategy:
           standard:
             shardingColumn: order_id
             shardingAlgorithmName: t_order_item_inline
         keyGenerateStrategy:
           column: order_item_id
           keyGeneratorName: snowflake
     bindingTables:
       - t_order,t_order_item
     defaultDatabaseStrategy:
       standard:
         shardingColumn: user_id
         shardingAlgorithmName: database_inline
     defaultTableStrategy:
       none:
   
     shardingAlgorithms:
       database_inline:
         type: INLINE
         props:
           algorithm-expression: ds_${user_id % 2}
       t_order_inline:
         type: INLINE
   
   MySQL client connection 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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to