【发布时间】:2014-09-12 00:29:38
【问题描述】:
在 PHP 中执行此代码时:
$db_nosql = new PDO('cassandra:host=127.0.0.1;port=9160;cqlversion=3.0.0');
我收到一条错误消息:
致命错误:带有消息的未捕获异常“PDOException”
'CQLSTATE[HY000] [2] 无法执行/准备 CQL2 语句,因为 CQL 已设置为 CQL3(这可能意味着您的客户尚未 正确升级以使用 Cassandra 中引入的新 CQL3 方法 1.2+)。
在 /home/web/site/Test/page.php:202 堆栈跟踪:#0 /home/web/site/Test/page.php(202): PDO->exec('USE mailing') #1 {main} 在第 202 行的 /home/web/site/Test/page.php 中抛出
我不知道在这种情况下我应该做什么。这是否意味着语法不正确?
谢谢。
【问题讨论】:
-
请再读一遍
This might mean your client hasn't been upgraded correctly to use the new CQL3 methods introduced in Cassandra 1.2+
标签: php pdo cassandra cql3 cqlsh