Re: Problems on CentOS 7 connecting to MS SQL Server with ODBC and SQLDriverConnect
Geoff Montee <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <CAA7biFNYFa8aq9=xf2T8C7=AMdO665SEg3y3ECsyDDwFcM8M8Q@mail.gmail.com> |
On Wed, Feb 4, 2015 at 6:02 PM, Frediano Ziglio <[email protected]> wrote: > > Did you try isql from mysql account? Could be something related to > some permissions or restrictions like SELinux. > Yeah, I tried isql as the mysql user. This worked just fine: sudo -u mysql isql connect_test_azure UID PWD That suggests to me that the mysql user can read all of the configuration files no problem. Since you mentioned SELinux, I just now set it to permissive mode, and now the CONNECT engine can connect to the data source with no issues. I guess SELinux doesn't want /usr/sbin/mysqld to make outgoing TCP connections. /var/log/messages shows: Feb 4 18:56:17 localhost python: SELinux is preventing /usr/sbin/mysqld from name_connect access on the tcp_socket . ***** Plugin catchall_boolean (89.3 confidence) suggests ****************** If you want to allow mysql to connect any Then you must tell SELinux about this by enabling the 'mysql_connect_any' boolean. You can read 'None' man page for more details. Do setsebool -P mysql_connect_any 1 ***** Plugin catchall (11.6 confidence) suggests ************************** If you believe that mysqld should be allowed name_connect access on the tcp_socket by default. Then you should report this as a bug. You can generate a local policy module to allow this access. Do allow this access for now by executing: # grep mysqld /var/log/audit/audit.log | audit2allow -M mypol # semodule -i mypol.pp Thanks for the help! Geoff