Mac OS安装使用ODBC

需要用到JMP连接数据库,我们的数据库是RDS(MySQL),在windows环境安装MySQL ODBC驱动即可,可是Mac OS下就比较复杂,因为Mac OS把ODBC管理组件去掉了,所以除了安装驱动外,还要安装管理包,然后做些修改,因为这个第三方的ODBC管理器版本很旧而且有bug。


1. 下载安装Mac OS MySQL ODBC驱动

https://dev.mysql.com/downloads/connector/odbc/

2. 下载安装ODBC Manager

http://www.odbcmanager.net/


3. 打开配置ODBC Manager,添加RDS数据库信息,点Add Keyword,添加3个keyword,然后修改为SERVER, PORT, DATABASE, value栏位填入对应的信息,这个时候发现这些value有些不能保存,因此可以通过打开其背后的ini文件直接编辑,路径为:System DSNs: /Library/ODBC/odbc.ini,而不是这个User DSNs:~/Library/ODBC/odbc.ini


具体步骤如下,参考: https://docs.snowflake.net/manuals/user-guide/odbc-mac.html

Configure the ODBC Driver

To configure the ODBC driver for Mac OS, create one or more data source (DSNs), which are stored in the following files, depending on the type of DSN you create:


•User DSNs: ~/Library/ODBC/odbc.ini
•System DSNs: /Library/ODBC/odbc.ini

To create a DSN, either use ODBC Manager or edit the appropriate odbc.ini file.

Creating a DSN Using ODBC Manager

To create a DSN in ODBC Manager:

1.Start ODBC Manager.

2.Click on User DSN or System DSN.

3.Click the Add button.

4.Select the driver to use (Snowflake) and click OK.

5.Enter the name of the DSN and optionally a description.

6.Create a Keyword/Value pair for each DSN parameter:

1.Click Add to create a Keyword/Value pair.
2.Select Keyword and replace it with the parameter name.
3.Select Value and replace it with the value for the parameter.

Repeat this process for each parameter. For details about the parameters that can be set for each DSN, see ODBC Configuration and Connection Parameters.

7.Click OK to create the DSN.

If you are creating the first user or system DSN for the ODBC driver, ODBC Manager creates the odbc.ini file in the corresponding directory for the type of DSN you are creating. If you are creating additional DSNs, ODBC Manager adds entries for each DSN to the existing odbc.ini file.



你可能感兴趣的:(数据处理)