Architecting, installing and maintaining your SAS environment

Error creating connection to MySQL via ODB on Linux

Reply
Contributor
Posts: 23

Error creating connection to MySQL via ODB on Linux

I've been trying to create a connection to a MySQL RDS on a SAS platform hosted on linux.  

 

Now let me first say I can connect to said MySQL on a windows SAS platform.  I simply create the ODBC connection in the OS and then create a library using the dsn.

 

On the linux platform I am getting the error:

 

ERROR: CLI error trying to establish connection: [unixODBC][MySQL][ODBC 5.2(w) Driver]Can't connect to local MySQL server through
socket '/var/lib/mysql/mysql.sock' (2)
ERROR: Error in the LIBNAME statement.

 

Because this on a linux machine I havent set the dsn in the ODBC.ini file.  But have been in touch with the admin to try various configurations like using the IP or the full dns.

 

Also, the MySQL DB is available via other software in the linux environment.

 

Has anyone encountered this, and more to the point solved it?

 

Many thanks

 

Contributor
Posts: 73

Re: Error creating connection to MySQL via ODB on Linux

Hi @max00d

This issue looks more like on the MySQL part on linux machine.

can you check under MySQL Conf file on what is the exact path of the socket is mentioned?

is it - '/var/lib/mysql/mysql.sock' or '/var/lib/mysql/mysqld.sock'

Thanks,
AV
Ask a Question
Discussion stats
  • 1 reply
  • 105 views
  • 0 likes
  • 2 in conversation