Hello,
I need to configure a MySQL connection on the SAS server but only using the SAS/Access Interface to ODBC.
Unfortunately the client doesn't want to get the SAS/Access interface to MySQL, which will be much easier.
Will be this possible to connect via ODBC Connector? If yes, I've already searched in my server for the odbc.ini and I found two:
One placed on /opt/sas/software/ and the other on /opt/sas/software/SASHome/SASODBCDriversfortheWebInfrastructurePlatformDataServer/9.4/Driver/. Should I use the first one?
On the other hand, I need to download to the unix server the MySQL connector right? Should I get the connector from here, https://dev.mysql.com/downloads/connector/odbc/, and place it in a folder on Server? Specific folder or, for example, tmp is fine?
Thanks,
Pedro
Thanks in advance,
Pedro
Yes, you can install and use unixODBC.
If you are on RHEL based system the mysql-connector-odbc package in the repos will suck in unixODBC as a dependency. Update an odbc.ini, if this system is only use for SAS /etc/odbc.ini could be used as the global default DSN's.
Sometimes when you use unixODBC there is some confusion for the runtime linked which libodbcinst.so.2 library to load. There is a line inside $SASROOT/bin/sasenv that has the WIP driver path. Comment that line out and your SAS sessions should load all the unixODBC libraries that came out the package and you'll be able to connect to a MySQL data source.
You can check which odbc.ini its in use in your sasenv_local file (*SASHOME*/SASFoundation/9.4/bin/sasenv_local
)
Then you can use UnixODBC mysql driver to connect to MySQL databases
Hello @pedrosantos_key,
please refer to:
and
I think they will help you very much 🙂 Thanks to @KatT_sas for the post in our Library!
Kind regards,
Juan
For MySQL there are Red Hat built packages in their repository that work. If you can use the software Red Hat compile and manage support for you then that is a good idea. I'd not go down the compiling unixODBC yourself in this specific situation.
The SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment.
SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.
Find more tutorials on the SAS Users YouTube channel.