Mac Odbc: Dsn Configuration For Mac

Posted By admin On 07.03.20

Configure the ODBC Driver on Linux and Mac OS X Operating Systems On Linux and Mac OS X operating systems, you use an ODBC driver manager to configure the ODBC connection settings. ODBC driver managers use configuration files to define and configure ODBC data sources and drivers. The ODBC driver manager that you use depends on the operating system that you use. For more information about the supported ODBC driver managers to configure the Amazon Redshift ODBC drivers, see for Linux operating systems and for Mac OS X operating systems. Three files are required for configuring the Amazon Redshift ODBC driver: amazon.redshiftodbc.ini, odbc.ini, and odbcinst.ini. If you installed to the default location, the amazon.redshiftodbc.ini configuration file is located in one of the following directories. /opt/amazon/redshiftodbc/lib/32 (for the 32-bit driver on Linux operating systems).

/opt/amazon/redshiftodbc/lib/64 (for the 64-bit driver on Linux operating systems). /opt/amazon/redshift/lib (for the driver on Mac OS X) Additionally, under /opt/amazon/redshiftodbc/Setup on Linux or /opt/amazon/redshift/Setup on Mac OS X, there are sample odbc.ini and odbcinst.ini files for you to use as examples for configuring the Amazon Redshift ODBC driver and the data source name (DSN).

We don't recommend using the Amazon Redshift ODBC driver installation directory for the configuration files. The sample files in the Setup directory are for example purposes only.

If you reinstall the Amazon Redshift ODBC driver at a later time, or upgrade to a newer version, the installation directory is overwritten and you'll lose any changes you might have made to those files. To avoid this, you should copy the amazon.redshiftodbc.ini file to a directory other than the installation directory.

If you copy this file to the user's home directory, add a period (.) to the beginning of the file name to make it a hidden file. For the odbc.ini and odbcinst.ini files, you should either use the configuration files in the user's home directory or create new versions in another directory. By default, your Linux or Mac OS X operating system should have an.odbc.ini file and an.odbcinst.ini file in the user's home directory (/home/$USER or /.). These default files are hidden files, which are indicated by the dot (.) in front of the file name, and they will only display when you use the -a flag to list the directory contents. Whichever option you choose for the odbc.ini and odbcinst.ini files, you will need to modify them to add driver and DSN configuration information.

If you chose to create new files, you also need to set environment variables to specify where these configuration files are located. Configuring the odbc.ini File You use the odbc.ini file to define data source names (DSNs). Use the following format on Linux operating systems.

ODBC Data Sources AmazonRedshiftx32=Amazon Redshift (x86) AmazonRedshiftx64=Amazon Redshift (x64) Amazon Redshift (x86) Driver=/opt/amazon/redshiftodbc/lib/32/libamazonredshiftodbc32.so Host=examplecluster.abc123xyz789.us-west-2.redshift.amazonaws.com.cn Port=5932 Database=dev locale=en-US Amazon Redshift (x64) Driver=/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so Host=examplecluster.abc123xyz789.us-west-2.redshift.amazonaws.com.cn Port=5932 Database=dev locale=en-US Use the following format on Mac OS X operating systems. On Linux, set LDLIBRARYPATH to point to the directory containing the driver manager libraries. For more information on supported driver managers, see.

On Mac OS X, set DYLDLIBRARYPATH to point to the directory containing the driver manager libraries. For more information on supported driver managers, see.

Optionally, set AMAZONREDSHIFTODBCINI to point to your amazon.redshiftodbc.ini file. AMAZONREDSHIFTODBCINI must specify the full path, including the file name. You must either set this variable, or place this file in a location where the system will find it in a search. The following search order is used to locate the amazon.redshiftodbc.ini file. If the AMAZONREDSHIFTODBCINI environment variable is defined, then the driver searches for the file specified by the environment variable. If the AMAZONREDSHIFTODBCINI environment variable is not defined, then the driver searches in its own directory—that is, the directory that contains the driver binary.

If the amazon.redshiftodbc.ini file cannot be found, the driver tries to automatically determine the driver manager settings and connect. However, error messages won't display correctly in this case.

If you decide to use a directory other than the user's home directory for the odbc.ini and odbcinst.ini files, you also need to set environment variables to specify where the configuration files appear.

20 May 2008 16:05 Charlie Boisseau Description: When using the MyODBC Driver on Mac OS X's ODBC Administratior application, any attempt to create a 'System DSN' (as opposed to a 'User DSN') always saves the settings under 'User DSN'. This means that processes not running from the currently logged in user (including any server services) cannot use the DSN. Having looked at the configuration of the driver in ODBC Administrator, it is correctly set to 'Define as: System', however changing this setting one way or the other does not resolve the problem. Tested the exact same setup using the 'Actual' (brand) ODBC driver, and it works perfectly. How to repeat: - Download MyODBC 3.51.25 for Mac OS X - Double Click on the DMG file to mount the disk image. Open the installer and follow installation instructions.

Mac

Odbc Dsn Connection

Once installed, open 'ODBC Administrator' from /Applications/Utilities/ - Check the driver is appearing under the 'Drivers' tab. Click on the 'System DSN' tab, and make sure the padlock in the bottom left is unlocked. Click 'Add' button (top right), Select the MySQL ODBC Driver. Enter valid details for a MySQL connection and give it a DSN Name.

Mac Odbc: Dsn Configuration For Mac Mac

Click the OK button on the configuration window. Click 'Apply' on the ODBC Administrator window. Note that the DSN has not appeared under 'System DSN' - Click onto 'User DSN' and you should find your newly created entry.