unixODBC connect error failed in CentOS 6
I have remove MySQL5.1 ,install MariaDB 10.1.18
mysql commend works normal.
than install mariadb connector/C 2.3.1 from source (cmake . && make && make install)
than install mariadb connector/odbc 2.0.12 from source (cmake . && make&& make install )
but I use isql to connect ,it give me:
[ISQL]ERROR: Could not SQLConnect
I use ODBC API to connect:
ret = SQLDriverConnect(dbc, NULL, "DSN=MariaDB-test;", SQL_NTS,
outstr, sizeof(outstr), &outstrlen,
SQL_DRIVER_PROMPT); I got:
HY092:1:0:[unixODBC][Driver Manager]Invalid attribute/option identifier
where is my config
Description = ODBC for MariaDB
Driver = /usr/local/lib/libmaodbc.so
DRIVER = MariaDB
DATABASE = test
DESCRIPTION = MariaDB ODBC Connector Test
UID = tts
PORT = 3306
Does anyone give me a hint to fix it ?
Answer Answered by H Json in this comment.
You have Port = 3306, but I think you also need to have something like Server = 127.0.0.1 to go with it.
Alternatively you can use Socket = /var/run/mysqld/mysqld.sock