mysql-connector-odbc RHEL7 incompatible via unixODBC 2.3.1 to Percona 5.6?
Hi guys
I have installed Percona-Server 5.6.28-rel76.1.el7.x86_64 on my Centos 7 system via YUM from the official Percona repositories. It is working fine just like official MySQL used to do. I am however finding it impossible to connect to Percona 5.6.28 via ODBC. I have installed the official Centos 7 unixODBC and mysql-connector-odbc packages via YUM. If I do an isql test to use ODBC to access the running Percona instance, it segfaults: Code:
[root@localhost lib64]# isql -v percona_dsnname username password My /var/log/messages contains: Code:
Feb 23 14:53:49 localhost kernel: isql[13427]: segfault at 1010070 ip 00007f15e3003f7e sp 00007ffdcf518d70 error 4 in libmyodbc5w.so[7f15e2fdd000+47000] How can I connect via ODBC to Percona "drop-in replacement" - not true ! - using isql and do queries on Percona without having ODBC segfault? Is there some way to get a "percona-sql-connector-odbc" for unixODBC 2.3.1 because the official Centos 7 mysql-connector-odbc clearly does not work. Thanks! |
Hi guys
Ok, I think I've solved this for now. Bit dirty / hacky, but it works. Since I was getting the isql segfaults from the Centos 7 official mysql-connector-odbc YUMed package, specifically the file libmyodbc5w.so in that package (as indicated by checking my /var/log/messages and seeing Code:
Feb 23 14:53:49 localhost kernel: isql[13427]: segfault at 1010070 ip 00007f15e3003f7e sp 00007ffdcf518d70 error 4 in libmyodbc5w.so[7f15e2fdd000+47000] I ran ldd on on libmyodbc5.so: Code:
[root@localhost lib64]# ldd libmyodbc.so Code:
libmysqlclient.so.18 => /lib64/libmysqlclient.so.18 (0x00007f882f769000) On checking /usr/lib64 on my Centos 7 box, I found this for libmysqlclient.so.18: Code:
[root@localhost lib64]# ls libmysqlclient* -l libmysqlclient.so.18.1.0 I read on an Ubuntu blog that somebody had a similar problem with unixODBC and Percona downgraded this file and that solved their problem. So I went to an older Centos box I had and lo and behold it had a file in /usr/lib64 called libmysqlclient.so.18.0.0 e. g. one minor version older. I copied this file into my Centos 7 box's /usr/lib64. Then I did this: Code:
rm libmysqlclient.so.18 Then I symlinked this same symbolic name to the libmysqlclient.so.18.0.0 file: Code:
ln -s libmysqlclient.so.18.0.0 libmysqlclient.so.18 Code:
[root@localhost lib64]# ls libmysqlclient* -l libmysqlclient.so.18.1.0 to not point to that anymore, but rather to point to libmysqlclient.so.18.0.0 thus effectively forcing isql to use an older libmysqlclient version when trying to connect over ODBC to Percona. This solved the problem, now if I use ISQL to test the ODBC connection to Percona: Code:
[root@localhost lib64]# isql -v percona_dsnname username password E. g. to get Centos 7 with official Centos 7 unixODBC and mysql-connector-odbc to work correctly over ODBC to Code:
Percona-Server-client-56.x86_64 5.6.28-rel76.1.el7 @percona-release-x86_64 libmysqlclient.so.18 symlink to point to libmysqlclient.so.18.0.0 and NOT to point to libmysqlclient.so.18.1.0 Using the older MySQLClient dynamic library file enables unixODBC functionality under Centos 7 to access a Percona-Server 5.6.28-rel76.1.el7 MySQL "drop in replacement" instance. Hope this helps somebody else. Regards, |
All times are GMT -5. The time now is 05:42 PM. |