Bracing against the wind  
www.documentroot.com  

Tuesday, November 20, 2007

SMX, MySQL and ODBC

It took me a little while to figure out why SMX wasn't working with MySQL when under apache, but worked fine from the shell. MySQL's odbc connector, by default, is installed with the "not thread safe" libraries. This also breaks PHP, and Python and any other Apache module that tries to call SQLExecDirect on a MySQL connection. The result is a "Segmentation Fault" for the program using that ODBC driver - not nice. To fix, simply edit the /etc/odbcinst.ini file and replace libmyodbc3.so with libmyodbc3_r.so.

While searching for the solution to this problem, I found dozens of bug reports, and unanswered threads littering the internet. So I hope this page gets indexed well enough to be useful, since I nearly wound up patching the odbc-connector drivers to fix it.

Installing a "thread-unsafe" driver by default seems to be in the best interests of nobody, and MySQL should probably stop doing that. Safe settings should be the default, and "overclock" settings should be something advanced users do.

Labels:


[View/Post Comments] [Digg] [Del.icio.us] [Stumble]

Home | Email me when this weblog updates: | View Archive

(C) 2002 Erik Aronesty/DocumentRoot.Com. Right to copy, without attribution, is given freely to anyone for any reason.


Listed on BlogShares | Bloghop: the best pretty good | Blogarama | Technorati | Blogwise