点燃odbc SQLSTATE [01000]错误如何解决?

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了点燃odbc SQLSTATE [01000]错误如何解决?相关的知识,希望对你有一定的参考价值。

我安装了点火器2.7,nginxphp7.0-fpm。

我还安装了unixodbc,unixodbc-dev,libtool,automake,libssl-dev和m4。

odbc安装看了官方主页并跟进,但出现了问题。

paint odbc.ini // odbcinst.ini // .odbc.ini(全部相同)

[Apache Ignite]
Description=Apache Ignite
DSN=Apache Ignite
Driver=/usr/local/lib/libignite-odbc.so
Setup=/usr/local/lib/libignite-odbc.so
DriverODBCVer=03.00
FileUsage=0
UsageCount=1

tail / etc / profile

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export LD_LIBRARY_PATH=/usr/local/lib/

ldd /usr/local/lib/libignite-odbc.so

linux-vdso.so.1 =>  (0x00007ffef07c0000)

libignite-binary-2.7.0.33575.so.0 => /usr/local/lib/libignite-binary-2.7.0.33575.so.0 (0x00007fd8b8d4d000)

libodbcinst.so.2 => /usr/lib/x86_64-linux-gnu/libodbcinst.so.2 (0x00007fd8b8b3b000)

libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fd8b87b9000)

libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd8b83ef000)

libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fd8b81d9000)

libignite-common-2.7.0.33575.so.0 => /usr/local/lib/libignite-common-2.7.0.33575.so.0 (0x00007fd8b7fc2000)

libltdl.so.7 => /usr/lib/x86_64-linux-gnu/libltdl.so.7 (0x00007fd8b7db8000)

libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fd8b7b9b000)

libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fd8b7892000)

/lib64/ld-linux-x86-64.so.2 (0x00007fd8b9227000)

libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fd8b768e000)

ex.php

<?php

try {
    // Connecting to Ignite using pre-configured DSN.
    $dbh = new PDO('odbc:Driver=Apache Ignite;ADDRESS=127.0.0.1:10800;Cache    =default');

    // Changing PDO error mode.
    $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

    // Preparing query.
    $dbs = $dbh->prepare('INSERT INTO city (id, name) VALUES (?, ?)');

    // Declaring parameters.
    $key = 777;
    $firstName = "James";

    // Binding parameters.
    $dbs->bindParam(1, $key);
    $dbs->bindParam(2, $firstName);

    // Executing the query.
    $dbs->execute();

} catch (PDOException $e) {
    print "Error!: " . $e->getMessage() . "
";
    die();
}

?>

本地主机/ ex.php

错误!:SQLSTATE [01000] SQLDriverConnect:0 [unixODBC] [驱动程序管理器]无法打开lib'/usr/local/lib/libignite-odbc.so':找不到文件

我不知道该尝试什么。谢谢您的帮助。

答案

尝试使用PHP瘦客户端,这需要更少的配置工作:https://apacheignite.readme.io/docs/php-thin-client

如果仍然需要PHP PDO,那么Ignite ODBC专家应该介入。

以上是关于点燃odbc SQLSTATE [01000]错误如何解决?的主要内容,如果未能解决你的问题,请参考以下文章

连接失败:SQLState:'01000' SQL Server 错误:53

SQLSTATE [01000] SQLDriverConnect:0 [unixODBC] [驱动程序管理器]无法打开库“IBMDB2”:找不到文件

ODBC无法连接SQL SERVER

ODBC数据库连接SQL Server失败?啥原因啊!~~

数据源 连接失败

SQLSTATE [01000]:警告:1265 列的数据被截断