kubernetes版本: v1.16.3
linux版本: 7.3.1611
在kubernetes上启动Vitess集群,然后登录到VTGate并创建表
./mysql -h 127.0.0.1 -P 15306 -uuser
mysql> CREATE TABLE sbtest1( id INTEGER NOT NULL AUTO_INCREMENT, k INTEGER DEFAULT '0' NOT NULL, c CHAR(120) DEFAULT '' NOT NULL, pad CHAR(60) DEFAULT '' NOT NULL, PRIMARY KEY (id) );
Query OK, 0 rows affected (0.32 sec)
mysql> show tables;
+--------------------+
| Tables_in_commerce |
+--------------------+
| sbtest1 |
+--------------------+
1 row in set (0.00 sec)
mysql> select * from sbtest1;
ERROR 1105 (HY000): table sbtest1 not foundshow tables;显示表sbtest1已经存在,但当从该表中进行选择时,出现错误。
发布于 2021-08-19 23:25:59
这可能是因为您有一个分片的键空间,但还没有为表创建vschema。
试一试
vtctlclient ApplyVSchema -vschema="{\"sharded\": false, \"tables\": { \"sbtest1\": { }}}" commercehttps://stackoverflow.com/questions/68392949
复制相似问题