2

I'm working on a Mac with a FileMaker ODBC Driver

I've successfully created new ODBC connections via this method: - open ODBC Manager - switch to system DSN tab - click add - select FileMaker ODBC driver - enter details (nickname, host, database)

How can I accomplish the same workflow via the command line on my mac?

My ideal pseudocode looks something like this: install_new_odbc_connection(nickname, host, database)

I've found a similar discussion for windows: Install An ODBC connection from cmd line

And here's a page which suggests that I might be able to edit some ini files directly, but I'm not sure how to do this: http://hiltmon.com/blog/2013/09/18/setup-odbc-for-r-on-os-x/

Community
  • 1
  • 1
Bobby
  • 1,585
  • 3
  • 19
  • 42

1 Answers1

3

This depends on your ODBC Management software. If you use "ODBC Manager" from http://www.odbcmanager.net/index.php you can modify the file directly through the bash:

/Library/ODBC/odbc.ini

Based on this article:

https://web.archive.org/web/20131007145001/https://www.jonathanstark.com/blog/setting-up-odbc-for-mysql-on-a-mac

Joshua Pinter
  • 45,245
  • 23
  • 243
  • 245
Nicolai Kant
  • 1,391
  • 1
  • 9
  • 23
  • Some tips: 1. Edit the `odbc.ini` file directly. Much more stable than using iODBC Administrator. 2. You don't need to specify the username or password in the `odbc.ini` connection. When connecting, use the username and password of a valid MySQL user. 3. You should specify the `Database` key in the connection. – Joshua Pinter Jun 28 '18 at 16:46