Having a heck of a time trying to isolate an issue on a new server install:
I've installed MySQL, unixODBC and the MySQL Connector for ODBC, setup odbc.ini and odbcinst.ini as I have on my other 32-bit systems, but having an issue with applications (except PHP) receiving garbled data after a query.
For control purposes, here is what a MySQL direct query returns:
mysql> select id,username from users limit 3; +------+----------+ | id | username | +------+----------+ | 786 | 101010 | | 587 | 1234 | | 1124 | 123456 | +------+----------+ 3 rows in set (0.00 sec) mysql>
The same command in isql via ODBC returns this garbled result, only the first piece of data gets returned:
SQL> select id,username from users limit 3; +-----------+---------------------------------+ | id | username | +-----------+---------------------------------+ | 786 | | | +-----------+---------------------------------+ SQLRowCount returns 3 3 rows fetched SQL>
My applications like isql are not able to return more than one piece of data. Strangely PHP scripts seem to work fine, but unfortunately my applications are not PHP based. Here is formatted PHP output:
ID: 786 Username: 101010 ID: 587 Username: 1234 ID: 1124 Username: 123456
odbc.ini
[site-db] Description = MySQL ODBC Site DB Driver = MySQL User = root Password = password Database = test Option = 3 Socket = /var/lib/mysql/mysql.sock
odbcinst.ini
[MySQL] DRIVER = /usr/lib64/libmyodbc3.so UsageCount = 1
System Info:
OS: CentOs 5.7 x86_64
MySQL: Server version: 5.5.20-log MySQL Community Server (GPL) by Remi x86_64
MySQL Connector: v3.51.30-0 x86_64
unixODBC: 2.2.11 x86_64
If anybody can make some suggestions as to how I might be solved this issue, it would be greatly appreciated.
Using the RPM from MySQL was the wrong way to go. Found an RPM for EL5 that worked without a hitch, have no idea what it wasn't showing in the YUM repos...but all is well now.