【sharding-jdbc报错】Thedifferentmetadataofactualtablesareasfollows

star2017 1年前 ⋅ 2194 阅读

在使用sharding-jdbc的时候,报错以下错误
Cannot get uniformed table structure for user. The different meta data of actual tables are as follows

原因是:
imagepng
这样配置的,在做保存的时候,会去判断uc0数据库下面是否有user0,user1两张表,如果没找到,那么就会报错。

解决:
1、在uc0数据库下面新增user0,user1两张表

2、或者修改配置为
sharding.jdbc.config.sharding.tables.user.actual-data-nodes=uc$->{0..1}.user

主要看你要不要分表。

本文为博主原创文章,未经博主允许不得转载。
更多内容请访问:IT源点

相关文章推荐

全部评论: 0

    我有话说: