MySQL :: MySQL 5.0 Reference Manual :: 20.1.4.5 Configuring a Connector/ODBC DSN on Unix

MySQL :: MySQL 5.0 Reference Manual :: 20.1.4.5 Configuring a Connector/ODBC DSN on Unix

In some cases when using unixODBC, you might get this error:

Data source name not found and no default driver specified

If this happens, make sure the ODBCINI and ODBCSYSINI environment variables are pointing to the right odbc.ini file. For example, if your odbc.ini file is located in /usr/local/etc, set the environment variables like this:

export ODBCINI=/usr/local/etc/odbc.ini
export ODBCSYSINI=/usr/local/etc
原文地址:https://www.cnblogs.com/lexus/p/2948687.html