MySQLTalk.org Forum Index MySQLTalk.org
MYSQL discussions groups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem using unixODBC and MySQL

 
Post new topic   Reply to topic    MySQLTalk.org Forum Index -> MySQL ODBC
View previous topic :: View next topic  
Author Message
Gary Wong
Guest





PostPosted: Mon Jul 12, 1999 2:28 pm    Post subject: Problem using unixODBC and MySQL Reply with quote



Hi!

I hope to use MySQL with iHTML - I am almost there!
I am having problems using unixODBC with MyODBC to connect to a
MySQL database. I am running MySQL 3.22.24 and MyODBC 2.50.24 on
Linux 2.0.36.

- I configured myodbc with:
.../configure --with-mysql-sources=/home/mysrces/mysql/mysql-3.22.24
--with-unixODBC=/usr --with-unixODBC-libs=/usr/lib
--with-unixODBC-includes=/usr/include

- the make and make install ran ok, and installed the driver
in /usr/local/lib
- I used ODBCConfig to add the driver using:
Driver Lib: /usr/local/lib/libmyodbc.so
Setup Lib: /usr/lib/libodbcmyS.so.1.0.0 [this is from unixODBC]
- I used ODBCCOnfig to create a system DSN for the test database:
Name: MySQLTest
Host: localhost
Port: 3306
Socket: /tmp/mysql.sock
Database: test
- I ran DataManager and tried to connect but I got:
Quote:
Login Failed
This may be for one of these reasons:
1. Invalid ID and Password
2. Invalid Data Source Config
3. Improper installation

- I ran "isql MySQLTest" and got:
[ISQL]ERROR: Could not SQLConnect

- I did a DSN trace and found this:
Quote:
[ODBC][28619][SQLConnect.c][170]Error: IM003
[ODBC][28619][SQLConnect.c][892]
Entry:
Connection = 0x8084390
Server Name = [MySQLTest][length = 9 (SQL_NTS)]
User Name = [testuser][length = 8 (SQL_NTS)]
Authentication = [mypasswd][length = 8 (SQL_NTS)]
[ODBC][28619][SQLConnect.c][170]Error: IM003

- I don't think that it is a permissions problem because I am able
to connect to the database using mysql monitor and the same
user/password combo. In addition, I was able to use the Windows
ODBC driver to connect to the test database using that
username/password
combo.

Any ideas? Thanks in advance!

Gary Wong
[email]gary.wong (AT) spingroup (DOT) com[/email]


Back to top
Gary Wong
Guest





PostPosted: Mon Jul 12, 1999 9:23 pm    Post subject: Re: Problem using unixODBC and MySQL Reply with quote



Solved! - Thanks to Jim Ziegler (see reply below).
Using dltest (i didn't know what that was for!),
I found that libmyodbc was looking for a
"libmysqlclient.so.6". MySql placed this file in
/usr/local/mysql/lib as "libmysqlclient.so",
and so I moved it to my path at /usr/lib, created
a sym link to it as "libmysqlclient.so.6" and viola!
All is well. By the way, what's "dlconfig", and
where can I find it?

Simone, you might want to do the same thing-
in the unixODBC's Drivers directory, you'll find
the dltest program. Do this:

../dltest /usr/local/lib/libmyodbc-2.50.23.so SQLConnect 1

If it comes back as failed, it will tell you which lib you're
missing (or not in your path).

Thanks also to everyone that replied - just made my day!

Gary Wong
[email]gary.wong (AT) spingroup (DOT) com[/email]

Jim Ziegler wrote:
Quote:

On Mon, Jul 12, 1999 at 09:28:03AM -0500, Gary Wong wrote:

- I did a DSN trace and found this:
[ODBC][28619][SQLConnect.c][170]Error: IM003
[ODBC][28619][SQLConnect.c][892]


For me, IM003 always means that a .so library that unixODBC
needs is missing. Try using the dltest tool that is included with
unixODBC to find out what is missing. Also, remember to run ldconfig.

Good luck.



Back to top
Display posts from previous:   
Post new topic   Reply to topic    MySQLTalk.org Forum Index -> MySQL ODBC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.