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

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

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

But that's mine

--
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:

But that's mine

Besides, althought I create table after changing my database into sharding_db, I still get error1046

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