Sample Header Ad - 728x90

LibreOffice Base ODBC connection to MariaDB fails: "Data source name not found"

0 votes
1 answer
2180 views
Linux Mint 20 (Ubuntu 20). MariaDB version: "mariadb Ver 15.1 Distrib 10.7.3-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2" I want to run LibreOffice Base as the front end, using ODBC. I have tried to follow the MariaDB instructions here . I have put the file libmaodbc.so in /usr/lib64/. I believe this is the main connector file. I have made a file /etc/odbcinst.ini as follows: [MariaDB] Description=MariaDB Connector/ODBC v.3.0 Driver=/usr/lib64/libmaodbc.so UsageCount=1 and a file /etc/odbc.ini as follows: [localdb] Description = MariaDB connection to database Driver = MariaDB Database = localdb Server = localhost User = root Password = root Port = 3306 Socket = /var/run/mysqld/mysqld.sock When I try to connect using LO Base, this ODBC entry "localdb" is seen. But then when I test out the connection I get: "[unixODBC][Driver Manager]Data source name not found, and no default driver specified" "Data source name"? "default driver"? Anyone know what I should do? My theory is that the odbc.ini file references the odbcinst.ini file, which in turn drives the libmaodbc.so file. NB if I go as far as trying to actually make the connection, i.e. to get a list of tables in the database in LO Base, I get "The connection to the data source "xxx"* could not be established
[ma-3.1.15]Can't connect to local server through socket '/var/run/mysqld/mysqld.sock' (13)" \* i.e. the LO Base filename minus the ".odb" extension. And also to check my socket (with the MariaDB service running): mike@M17A:~/MariaDB_files$ netstat -ln | grep mysql unix 2 [ ACC ] STREAM LISTENING 263752 /var/run/mysqld/mysqld.sock ... interesting: seems to suggest that the socket is alive and well. Also I **can** connect using isql localdb from the CLI: doesn't this suggest things are set up OK?
Asked by mike rodent (1172 rep)
Apr 1, 2022, 11:30 AM
Last activity: Apr 28, 2025, 10:01 AM