Database Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesDatabase Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old December 15th, 2003, 06:21 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 25
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
  #2  
Old December 15th, 2003, 03:24 PM
Matt Matt is offline
Contributing User
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 12 m 16 sec
Reputation Power: 7
RE: RE: Problem with unixODBC and MySQL

Couple things to look at...number one, it doesn't look like you have the proper parameter names in the odbc.ini file...for instance, Username should be user, Servername should be server ...

http://www.mysql.com/doc/en/MyODBC_connect_parameters.html

Also, did you compile MyODBC? Did you configure it with:

./configure --with-unixODBC

??


Reply With Quote
  #3  
Old December 18th, 2003, 04:47 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 25
RE: RE: Problem with unixODBC and MySQL

According to all the literature, the parameters seem to be correct. MyODBC isn't compiled, (at least the version (3.5) I downloaded didn't need to be), it's just a collection of libraries/drivers...

In any case, I re-installed the package and can now connect. Thanks for the help

Josh Lewis

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesDatabase Help > RE: Problem with unixODBC and MySQL


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

Request Your Free Technology Downloads!
 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

Request Your Free Technology Downloads!
 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

Request Your Free Technology Downloads!
 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

Request Your Free Technology Downloads!
 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 9 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek