关于如何使用以前的规范/版本启动 cqlsh 的文档不正确...您需要使用 --cqlversion 而不是 -2 (请参阅下面的注释)。但是,正如 jbellis 的回答中提到的,cql2 支持已从更高版本的 cassandra 中删除。
CQL Shell for Apache Cassandra
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-C, --color Always use color output
--no-color Never use color output
-u USERNAME, --username=USERNAME
Authenticate as user.
-p PASSWORD, --password=PASSWORD
Authenticate using password.
-k KEYSPACE, --keyspace=KEYSPACE
Authenticate to the given keyspace.
-f FILE, --file=FILE Execute commands from FILE, then exit
-t TRANSPORT_FACTORY, --transport-factory=TRANSPORT_FACTORY
Use the provided Thrift transport factory function.
--debug Show additional debugging information
--cqlversion=CQLVERSION
Specify a particular CQL version (default: 3.1.1).
Examples: "3.0.3", "3.1.0"
-e EXECUTE, --execute=EXECUTE
Execute the statement and quit.