Details
-
Task
-
Status: Closed (View Workflow)
-
Trivial
-
Resolution: Fixed
Description
I think it would be a good idea to modify the knowledge base's section on using CONNECT's ODBC table type on Linux/Unix:
Perhaps changing it to something like:
ODBC Tables on Linux/Unix
The following are a few things that should be taken into consideration when using ODBC tables with CONNECT on Linux/Unix.
Prerequisites
In order to use ODBC tables, you will need to have unixODBC installed. Additionally, you will need the ODBC driver for your foreign server's protocol. For example, for MS SQL Server or Sybase, you will need to have FreeTDS installed.
Permissions
Make sure the user running mysqld (usually the mysql user) has permission to the ODBC data source configuration and the ODBC drivers.
SELinux
SELinux can cause various problems. If you think SELinux is causing problems, check the system log (e.g. /var/log/messages) or the audit log (e.g. /var/log/audit/audit.log).
Some known SELinux problems
- mysqld can't load some executable code, so it can't use the ODBC driver.
Example error:
Error Code: 1105 [unixODBC][Driver Manager]Can't open lib
|
'/usr/cachesys/bin/libcacheodbc.so' : file not found
|
Audit log:
type=AVC msg=audit(1384890085.406:76): avc: denied { execute }
|
for pid=1433 comm="mysqld"
|
path="/usr/cachesys/bin/libcacheodbc.so" dev=dm-0 ino=3279212
|
scontext=unconfined_u:system_r:mysqld_t:s0
|
tcontext=unconfined_u:object_r:usr_t:s0 tclass=file
|
- mysqld can't open TCP sockets on some ports, so it can't connect to the foreign server.
Example error:
ERROR 1296 (HY000): Got error 174 '[unixODBC][FreeTDS][SQL Server]Unable to connect to data source' from CONNECT
|
Audit log:
type=AVC msg=audit(1423094175.109:433): avc: denied { name_connect } for pid=3193 comm="mysqld" dest=1433 scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:mssql_port_t:s0 tclass=tcp_socket
|