Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.