{"id":1085,"date":"2017-08-11T17:18:51","date_gmt":"2017-08-11T12:18:51","guid":{"rendered":"http:\/\/alexeyka.zantsev.com\/?p=1085"},"modified":"2017-08-11T17:18:51","modified_gmt":"2017-08-11T12:18:51","slug":"debian-9-mariadb-odbc","status":"publish","type":"post","link":"https:\/\/alexeyka.zantsev.com\/?p=1085","title":{"rendered":"Debian 9, MariaDB, ODBC"},"content":{"rendered":"<p>Debian <a href=\"https:\/\/www.debian.org\/News\/2017\/20170617\" target=\"_blank\">switched<\/a> from MySQL to MariaDB since release 9.<br \/>\nAnd as for now (2017-august-11) it seems that there is no ODBC package for MariaDB connection.<\/p>\n<p>You need to <a href=\"https:\/\/downloads.mariadb.org\/connector-odbc\/+releases\/\" target=\"_blank\">download<\/a> connector manually from MariaDB website. I tried 3.0.1 (beta) and it didn&#8217;t work for me, so I used latest stable (as for now, 2.0.15).<\/p>\n<p>Just download gzipped tar file (not source), unpack it and place libmaodbc.so to \/usr\/lib\/x86_64-linux-gnu\/odbc\/<\/p>\n<p>After that your odbcinst.ini should look like this:<\/p>\n<pre>\r\n[MariaDB]\r\nDescription=MariaDB\r\nDriver=\/usr\/lib\/x86_64-linux-gnu\/odbc\/libmaodbc.so   \r\nSetup=\/usr\/lib\/x86_64-linux-gnu\/odbc\/libmdbodbc.so   \r\nFileUsage=1\r\nUsageCount=1\r\n# not sure if we need 'Setup' at all. As I understood, it's for GUI tool and as you see, \r\n# I steel have a wrong lib here :) but now everything works\r\n<\/pre>\n<p>If you&#8217;re in a hurry, you may configure your server right now. But there&#8217;s a second part of the story.<\/p>\n<p>As it was my first practice with Debian 9, MariaDB and ODBC connection for it, I haven&#8217;t know exactly what packages do I need. It seemed to be clear that some package names will be different in contrast to Debian 8\/MySQL+ODBC.<\/p>\n<p>That&#8217;s why I installed <a href=\"https:\/\/packages.debian.org\/stretch\/odbc-mdbtools\" target=\"_blank\">odbc-mdbtools<\/a>, thinking that &#8220;MDB&#8221; means &#8220;MariaDB&#8221; :-)<br \/>\nNothing worked, and &#8220;isql -v %connector name% %DB user% %DB pass%&#8221; command showed that &#8220;File not found&#8221;. I was confused!<\/p>\n<p>It was my fault that I haven&#8217;t read the package description, relying on package name only.<\/p>\n<p>And then, after some hours of research (including my <a href=\"http:\/\/www.linuxquestions.org\/questions\/linux-server-73\/debian-9-odbc-mariadb-4175611736\/\" target=\"_blank\">monologue<\/a> at Linuxquestions) I configured MariaDB + ODBC.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Debian switched from MySQL to MariaDB since release 9. And as for now (2017-august-11) it seems that there is no ODBC package for MariaDB connection. You need to download connector manually from MariaDB website. I tried 3.0.1 (beta) and it didn&#8217;t work for me, so I used latest stable (as for now, 2.0.15). Just download [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[41,233,236,221],"class_list":["post-1085","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-debian","tag-debian-9","tag-mariadb","tag-odbc"],"_links":{"self":[{"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/posts\/1085","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1085"}],"version-history":[{"count":1,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/posts\/1085\/revisions"}],"predecessor-version":[{"id":1086,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/posts\/1085\/revisions\/1086"}],"wp:attachment":[{"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1085"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1085"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1085"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}