I’m new to memsql and I need to connect through ODBC or some other C++ API. I’m testing it on a Mac installed locally. I installed MariaDB ODBC driver, I created a Data Source on the 3306 port on 127.0.0.1 but it keeps connecting to MySQL that is installed on port 3308. Any help is appreciated. Thanks.
Hi @nelson.muller, you have a few options. You can use the MariaDB C++ connector found here.
Alternatively, if you want to continue to use ODBC, you’ll need to make sure that you have all of the configurations set properly in the odbc.ini and odbcinst.ini files defined properly as well as the environment variables set. Some details can be found here. If you are still having trouble, can you please remove any sensitive information and provide the contents of the .ini files for us to review?
I am going to try using ODBC for now. I also have MySQL installed on localhost but on port 3308. It appears that the ODBC datasource definitions is ignoring the port number 3306 I defined for MemSQL, and is connecting to MySQL on port 3308.
The odbcinst.ini and odbc.ini are below, with odbcinst.ini first:
[ODBC Drivers]
MariaDB ODBC 3.1 Driver = Installed
[MariaDB ODBC 3.1 Driver]
Description = MariaDB Connector/ODBC v.3.1
Driver = /usr/local/lib/mariadb/libmaodbc.dylib
Threading = 0
and the odbc.ini is:
[ODBC]
Debug = 1
DebugFile = /tmp/odbc-debug-file.log
Trace = 0
TraceFile = /tmp/odbc-trace-file.log
TraceAutoStop = 1
[ODBC Data Sources]
SS_MariaDB = MariaDB ODBC 3.1 Driver
[SS_MariaDB]
Driver = /usr/local/lib/mariadb/libmaodbc.dylib
Database = MyDatabase
Password = MyPassword
Port = 3306
Server = localhost
User = root
The configuration looks OK. Can you please also provide a code snippet that you’re using to make the connection?
I know it’s quite an old topic but i’m facing an issue related to the ODBC Driver Connector
Testing on a debian 10(tested 11 also) docker container, added the configuration on both (odbc.ini & odbcinst.ini) as specified on the documentation
Also added the [ODBC] section on the odbcinst.ini to get some feedback about what’s happening with the TraceFile directive
Everytime i try to connect using isql singlestore-unicode
it’s logging the following:
[ODBC][671][1673323409.495868][SQLConnect.c][1139]Can't open lib '/usr/src/singlestore-connector-odbc-1.1.1-debian10-amd64/libssodbcw.so' : file not found
The file is located correctly as running ls -la /usr/src/singlestore-connector-odbc-1.1.1-debian10-amd64
i get the following:
-rwxrwxrwx 1 root root 2985768 Nov 10 10:11 libssodbca.so
-rwxrwxrwx 1 root root 3006400 Nov 10 10:11 libssodbcw.so
Btw, we are trying to use singlestore as a CDR database with multiple PBX connections and the only way to do it directly is the ODBC option, also tried with the latest mariadb driver but it didn’t work (but it connects to a normal mariadb database)
Any help would be appreciated
Hi @trystan
Can you please execute
ldd /usr/src/singlestore-connector-odbc-1.1.1-debian10-amd64/libssodbcw.so
and share the output of this command?