ANyway, i've been trying to install the ODBC extension for PHP onto one of our servers (Redhat), and i think it got it installed correctly but now when i try to test the connection i get the error message about the data source name being too long... It sounds like a simple thing to fix, but i can't work out..how..or where.
Basically these are the settings i've got at the moment:
# odbcinst -j DRIVERS............: /etc/odbcinst.ini SYSTEM DATA SOURCES: /etc/odbc.ini FILE DATA SOURCES..: /etc/ODBCDataSources USER DATA SOURCES..: /root/.odbc.ini SQLULEN SIze.......: 4 SQLSETPOSIROW......: 2
I've got my MySQL driver defined in the odbcinst.ini as such:
[MySQL] Description = ODBC for MySQL Driver = /usr/lib/libmyodbc5.so Setup = /usr/lib/libodbcmyS.so FileUsage = 1
I've double checked and the Driver & Setup paths are correct and pointing to the correct files.
So now I'm trying to add a System Data Source by editing the odbc.ini file. I've tried it in various different formats, following examples from different sites, e.g.
As you can see i've commented some of them out and tried different ones:
;[mytest] ;driver = MySQL ;Database = moodle ;Server = localhost ;Socket = /var/lib/mysql/mysql.sock ;[mynew] ;Description = MySQL ;Driver = MySQL ;SERVER = localhost ;USER = root ;PASSWORD = ;PORT = 3306 ;DATABASE = moodle [Default] Driver = /usr/lib/libmyodbc5.so Description = Connector/ODBC 5 Driver DSN SERVER = localhost PORT = USER = root Password = Database = moodle SOCKET =
However, whenever i run isql -v to see if there are any problems, i always get:
[IM010][unixODBC][Driver Manager]Data source name too long [ISQL]ERROR: Could not SQLConnect
My googling around the error only ever seems to turn up results for people having a connection string within something like ASP, nothing about how to get it working on the server in this way...
Could anyone offer me any advice/help?