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 > mysql connection

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-29-04, 01:36
baburajv baburajv is offline
Registered User
 
Join Date: Feb 2004
Location: Bangalore, India
Posts: 242
Question mysql connection

hi

i could nt connect to mysql from my client app using the connection str

DRIVER={MySQL ODBC 3.51 Driver};SERVER=192.168.1.212;DATABASE=DB1;UID=MyUs er1;PWD=MyPasswd1;OPTION=18475

but when i give 'localhost' instead of IP it gets connected to the database

the ADO error message is

error no -2147467259

[MySQL][ODBC 3.51 Driver]Access denied for user: 'MyUser1@MySystem' (Using password: YES

pl explain this
__________________
Cheers....

baburajv
Reply With Quote
  #2 (permalink)  
Old 02-29-04, 13:58
aus aus is offline
Registered User
 
Join Date: Oct 2003
Location: Denver, Colorado
Posts: 137
Re: mysql connection

How have you specified the hostnames in the user, host and db tables in the mysql database?
Reply With Quote
  #3 (permalink)  
Old 02-29-04, 23:03
baburajv baburajv is offline
Registered User
 
Join Date: Feb 2004
Location: Bangalore, India
Posts: 242
Re: mysql connection

Quote:
Originally posted by aus
How have you specified the hostnames in the user, host and db tables in the mysql database?

could u pl explain , or suggest some links

am new to mysql
__________________
Cheers....

baburajv
Reply With Quote
  #4 (permalink)  
Old 03-01-04, 01:10
diuyan diuyan is offline
Registered User
 
Join Date: Feb 2004
Posts: 3
Re: mysql connection

try this..

note:
xserver,xdatabase,xuser,xpass is a variable

example:
xserver="192.168.215.3"
xdatabase="customer"
xuser="reuben"
xpass="none"

also check the character case either lower/upper case of your mysql database,user,password design

connStr = "DRIVER={MySQL ODBC 3.51 Driver};" _
& "SERVER=" & xserver & ";" _
& "DATABASE=" & xdatabase & ";" _
& "UID=" & xuser & ";" _
& "PWD=" & xpass & ";" _
& "OPTION=18475"


Quote:
Originally posted by baburajv
hi

i could nt connect to mysql from my client app using the connection str

DRIVER={MySQL ODBC 3.51 Driver};SERVER=192.168.1.212;DATABASE=DB1;UID=MyUs er1;PWD=MyPasswd1;OPTION=18475

but when i give 'localhost' instead of IP it gets connected to the database

the ADO error message is

error no -2147467259

[MySQL][ODBC 3.51 Driver]Access denied for user: 'MyUser1@MySystem' (Using password: YES

pl explain this
Reply With Quote
  #5 (permalink)  
Old 03-01-04, 02:57
baburajv baburajv is offline
Registered User
 
Join Date: Feb 2004
Location: Bangalore, India
Posts: 242
THANKS,,

IT WORKED,

BUT WATS THE OPTION, 18475 ?
__________________
Cheers....

baburajv
Reply With Quote
  #6 (permalink)  
Old 03-01-04, 03:11
aus aus is offline
Registered User
 
Join Date: Oct 2003
Location: Denver, Colorado
Posts: 137
Option 18475 is the sum of a few different options that MyODBC accepts, like changing LONGLONG columns to INT, for one. It also uses a compressed communication protocol, simulates an ODBC 1.0 driver, doesn't set a packet limit, returns found rows instead of affected rows and tells the driver that the client can't handle the real width of the column. More detail is available below.
http://www.mysql.com/doc/en/MyODBC_c...arameters.html
Reply With Quote
  #7 (permalink)  
Old 03-01-04, 05:30
baburajv baburajv is offline
Registered User
 
Join Date: Feb 2004
Location: Bangalore, India
Posts: 242
thanks
__________________
Cheers....

baburajv
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