[英]MariaDB ODBC on Red Hat Linux
When I try to connect to a Maria DB from Power BI I get this error:当我尝试从 Power BI 连接到 Maria DB 时,出现此错误:
"The 'Driver' property with value '{MariaDB ODBC 3.1 Driver}' doesn't correspond to an installed ODBC driver."
In the Linux RedHat server itself when I run this command it just hangs, I dont get an error:在 Linux RedHat 服务器本身中,当我运行此命令时它只是挂起,我没有收到错误:
$ isql MariaDB
These are my configs:这些是我的配置:
in the "odbc.ini" file I just put a random username, password, and port.在“odbc.ini”文件中,我只是放了一个随机的用户名、密码和端口。 And the public IP of the linux server itself:
以及linux服务器本身的公共IP:
[MariaDB]
Description=MariaDB server
Driver=MariaDB
SERVER=the public IP address of the server where the mariaDB is
USER=random username
PASSWORD=random password
DATABASE=test
PORT=443
the odbcinst.ini file: odbcinst.ini 文件:
[MariaDB]
Description=MariaDB Connector/ODBC
Driver=/usr/lib64/libmaodbc.so
Setup=/usr/lib64/libodbcmyS.so
Driver64=/usr/lib64/libmaodbc.so
UsageCount=3
I need help with figuring out what i'm missing?我需要帮助弄清楚我缺少什么? Thank you
谢谢
These are all the configs I did since I created the server:这些是我创建服务器后所做的所有配置:
yum install mariadb-server.x86_64
systemctl start mariadb
mkdir odbc_package
cd odbc_package
wget https://downloads.mariadb.com/Connectors/odbc/connector-odbc-3.1.7/mariadb-connector-odbc-3.1.7-ga-rhel7-x86_64.tar.gz
tar -xvzf mariadb-connector-odbc-3.1.7-ga-rhel7-x86_64.tar.gz
sudo install lib64/libmaodbc.so /usr/lib64/
sudo install -d /usr/lib64/mariadb/
sudo install -d /usr/lib64/mariadb/plugin/
sudo install lib64/mariadb/plugin/auth_gssapi_client.so /usr/lib64/mariadb/plugin/
sudo install lib64/mariadb/plugin/caching_sha2_password.so /usr/lib64/mariadb/plugin/
sudo install lib64/mariadb/plugin/client_ed25519.so /usr/lib64/mariadb/plugin/
sudo install lib64/mariadb/plugin/dialog.so /usr/lib64/mariadb/plugin/
sudo install lib64/mariadb/plugin/mysql_clear_password.so /usr/lib64/mariadb/plugin/
sudo install lib64/mariadb/plugin/sha256_password.so /usr/lib64/mariadb/plugin/
sudo yum install unixODBC
##created a template file similar to the following, with a name like MariaDB_odbc_driver_template.ini:
[MariaDB ODBC 3.1 Driver]
Description = MariaDB Connector/ODBC v.3.1
Driver = /usr/lib64/libmaodbc.so
##And then install it to the system's global /etc/odbcinst.ini file with the following command:
sudo odbcinst -i -d -f MariaDB_odbc_driver_template.ini
#create a template file similar to the following, with a name like MariaDB_odbc_data_source_template.ini:
[MariaDB-server]
Description=MariaDB server
Driver=MariaDB ODBC 3.0 Driver
SERVER=<your server>
USER=<your user>
PASSWORD=<your password>
DATABASE=<your database>
PORT=<your port>
#And then you can install it to the system's global /etc/odbc.ini file with the following command:
sudo odbcinst -i -s -l -f MariaDB_odbc_data_source_template.ini
Is the path to the ODBC driver location in your PATH? ODBC 驱动程序位置的路径是否在您的 PATH 中? That's a common reason why an ODBC driver cannot be located.
这是找不到 ODBC 驱动程序的常见原因。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.