You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "4RSENALZ (via GitHub)" <gi...@apache.org> on 2023/12/11 12:15:53 UTC

[I] shardingsphere+MySQL, any statement will report an error 2014 [shardingsphere]

4RSENALZ opened a new issue, #29364:
URL: https://github.com/apache/shardingsphere/issues/29364

   mysql-connector-j-8.1.0+ShardingSphere-Proxy 5.2.1
   
   No matter what statement is executed this error will be reported
   ![error2014](https://github.com/apache/shardingsphere/assets/143997961/0f4b11a5-c6af-47e0-a927-b8fe6ae239bd)
   
   my server.yaml is minimalist configuration
   
   ```
   rules:
     - !AUTHORITY
       users:
         - root@%:root
         - sharding@:sharding
       provider:
         type: ALL_PRIVILEGES_PERMITTED
   
   props:
     max-connections-size-per-query: 1
     executor-size: 16  # Infinite by default.
     proxy-frontend-flush-threshold: 128  # The default value is 128.
   ```
   
   
   my config-sharding.yaml is default setting
   ```
   databaseName: sharding_db
   
   dataSources:
     ds_0:
       url: jdbc:mysql://127.0.0.1:3306/edu_db_1?serverTimezone=UTC&useSSL=false
       username: root
       password:root
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
     ds_1:
       url: jdbc:mysql://127.0.0.1:3306/edu_db_1?serverTimezone=UTC&useSSL=false
       username: root
       password:root
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
   
   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
         auditStrategy:
           auditorNames:
             - sharding_key_required_auditor
           allowHintDisable: true
       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:
     defaultAuditStrategy:
       auditorNames:
         - sharding_key_required_auditor
       allowHintDisable: true
   
     shardingAlgorithms:
       database_inline:
         type: INLINE
         props:
           algorithm-expression: ds_${user_id % 2}
       t_order_inline:
         type: INLINE
         props:
           algorithm-expression: t_order_${order_id % 2}
       t_order_item_inline:
         type: INLINE
         props:
           algorithm-expression: t_order_item_${order_id % 2}
   
     keyGenerators:
       snowflake:
         type: SNOWFLAKE
   
     auditors:
       sharding_key_required_auditor:
         type: DML_SHARDING_CONDITIONS
   
   
   ```
   Does anybody know why
   plzzzzzz help me😢


-- 
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: notifications-unsubscribe@shardingsphere.apache.org.apache.org

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


Re: [I] shardingsphere+MySQL, any statement will report an error 2014 [shardingsphere]

Posted by "4RSENALZ (via GitHub)" <gi...@apache.org>.
4RSENALZ commented on issue #29364:
URL: https://github.com/apache/shardingsphere/issues/29364#issuecomment-1850418086

   ![succeed](https://github.com/apache/shardingsphere/assets/143997961/c14f372e-4d40-4fdf-89cb-414015b17225)
   Now I can operate normally, but why I use the "show databases" after connecting to the ShardingSphere proxy, and it's the same as the result I connect directly with MySQL locally? I saw in the tutorial that the result should only be a table that created in config-sharding.yaml like this
   ![onetable](https://github.com/apache/shardingsphere/assets/143997961/334cdcca-89c4-4135-80db-e0b8ffa6fb9b)
   But that's mine
   ![mine](https://github.com/apache/shardingsphere/assets/143997961/e1757ae9-ee4f-4a1d-9f27-e9293f42dd93)
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


Re: [I] shardingsphere+MySQL, any statement will report an error 2014 [shardingsphere]

Posted by "4RSENALZ (via GitHub)" <gi...@apache.org>.
4RSENALZ commented on issue #29364:
URL: https://github.com/apache/shardingsphere/issues/29364#issuecomment-1850300997

   > Maybe you can try it again with `ShardingSphere` 5.4.1 version and `MySQL` 8.0.31 version driver.
   
   thxxxxxxxxxx!!! It actually worked!😭🥳


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


Re: [I] shardingsphere+MySQL, any statement will report an error 2014 [shardingsphere]

Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
RaigorJiang commented on issue #29364:
URL: https://github.com/apache/shardingsphere/issues/29364#issuecomment-1851442346

   Close because it has been resolved.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


Re: [I] shardingsphere+MySQL, any statement will report an error 2014 [shardingsphere]

Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
RaigorJiang closed issue #29364: shardingsphere+MySQL, any statement will report an error 2014
URL: https://github.com/apache/shardingsphere/issues/29364


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


Re: [I] shardingsphere+MySQL, any statement will report an error 2014 [shardingsphere]

Posted by "zhaojinchao95 (via GitHub)" <gi...@apache.org>.
zhaojinchao95 commented on issue #29364:
URL: https://github.com/apache/shardingsphere/issues/29364#issuecomment-1850168448

   Maybe you can try it again with `ShardingSphere` 5.4.1 version and `MySQL` 8.0.31 version driver.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


Re: [I] shardingsphere+MySQL, any statement will report an error 2014 [shardingsphere]

Posted by "4RSENALZ (via GitHub)" <gi...@apache.org>.
4RSENALZ commented on issue #29364:
URL: https://github.com/apache/shardingsphere/issues/29364#issuecomment-1850597332

   Why I use "show databases" and it shows so many databases?
   I saw in tutorial and it says there should be only one database that created in config-sharding.yaml like this:
   ![onetable](https://github.com/apache/shardingsphere/assets/143997961/d71a0629-774c-424f-95fe-0882a55f65ae)
   But that's mine
   ![mine](https://github.com/apache/shardingsphere/assets/143997961/24383ab0-fc74-4549-ac31-a0b38a22764c)
   Besides, althought I create table after changing my database into sharding_db, I still get error1046
   ![1046](https://github.com/apache/shardingsphere/assets/143997961/ea9706f8-3e07-4138-b5ef-37a3488de325)
   Can someone tell me why, please😯
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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