gpt4 book ai didi

在 Ubuntu 上使用 SSL 的 MySQL ODBC 连接

转载 作者:行者123 更新时间:2023-12-04 18:42:52 26 4
gpt4 key购买 nike

我正在尝试在需要 ssl 的服务器上建立和 ODBC 连接。这是我的 odbc.ini

RemoteConn= MySQL Unicode

[RemoteConn]
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc8w.so
Description = RemoteConn Connection
SERVER = the remote IP Address
Database = Remote DB Name
USER = Remote DB USer
Password = Remote DB Pass
sslkey = /home/gzappy/RemoteConnCerts/client-key.pem
sslcert = /home/gzappy/RemoteConnCerts/client-cert.pem
sslca = /home/gzappy/RemoteConnCerts/ca-cert.pem
sslcapath = /home/gzappy/RemoteConnCerts/
sslVerify = 1
SSLMODE = REQUIRED
这是我的 odbcinst.ini
[ODBC Drivers]
MySQL Unicode = Installed
MYSQL ANSI = Installed

[MySQL Unicode]
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc8w.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc8w.so

[MYSQL ANSI]
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc8a.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc8a.so
当我运行 iodbctest 时,我可以看到我的 dsn,当我选择它时,我得到以下输出:
1: SQLDriverConnect =  (0) SQLSTATE=
1: ODBC_Connect = ⚌ (0) SQLSTATE=

可能是什么问题,我怎样才能成功连接到 ODBC?

最佳答案

我通过更改 sslkey to ssl-key sslcert to ssl-cert sslca to ssl-ca 解决了它

关于在 Ubuntu 上使用 SSL 的 MySQL ODBC 连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69267804/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com