If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > RE: Problem with unixODBC and MySQL

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-09-03, 04:09
joshlewis joshlewis is offline
Registered User
 
Join Date: Dec 2003
Posts: 4
RE: Problem with unixODBC and MySQL

I'm using Red Hat 9 with Apache (not sure which ver), PHP 4, MySQL 4.0.16 and unixODBC (from unixODBC) and the standard libraries which come with it.

I've set up numerous DSN's, using both the standard MySQL driver (libodbcmyS.so) and the MyODBC 3 library (libmyodbc3.so). As far as I can tell. I've set up the DSNs correctly, using both ODBCConfig, and by editing the .ini files directly. However, whenever I try to connect to one of the DSNs, (either with isql or PHP) I get the following error:

Warning: SQL error: [unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed, SQL state IM004 in SQLConnect

I've searched for the rror string on Google and other places, but have had no success. It seems to me that the DSN is obviously not set up correctly, or cannot connect to the MySQL server. I know the MySQL server works, as I've accessed it via PHP, and directly.

A copy of the odbc.ini (server DSN fi;le) is given below:

[ODBC Data Sources]

[MySQL]
Description = ODBC for MySQL
Driver = /usr/lib/libodbcmyS.so
Database = test
Servername = localhost
Username = "root"
Password = ""
Port =

A copy of the odbcinst.ini is given below:
[MySQL]
Description = ODBC for MySQL
Driver = /usr/lib/libodbcmyS.so
Setup =
FileUsage = 1
CPTimeout =
CPReuse =


root@localhost (without a password) is allowed full access to the MySQL server; and I've also tried using several username - password pairs, but this doesn't change anything.

Any help would be greatly appreciated.

Thanks in advance
Josh Lewis
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On