Actually I can connect from the web server to the DB server using DSN (the odbc tool 
under windows). What I cannot do is connect from ASP in the same way.

I have a work around, but I still would like to determine what the problem is with a 
DSNless connection.

The work around is to use a DSN entry and call it, for example;

conn.open "dsn=myodbcconn; user=myuser; password=mypassword"

where myodbcconn is a "System DSN"

Why doesn't;

conn.open "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=myserver.com; USER=myuser; 
PASSWORD=mypassword; DATABASE=myDB; PORT:3307; OPTION=35;"

work?

Yes the port number really is 3307.

Paul



-----Original Message-----
From: Michael Stassen [EMAIL PROTECTED];]
Sent: 8/15/2004 8:05:23 PM
To: [EMAIL PROTECTED]
Subject: Re: ASP Connection to Mysql fails

If I understand you correctly, you can connect to both mysql servers from 
localhost, but not to one from the other.  To mysql, a user is a combination 
of user and connecting host, so I think your problem translates as you can 
connect as [EMAIL PROTECTED], but you cannot connect as [EMAIL PROTECTED] 
    You probably need to add a mysql user to allow this.  See the manual for 
the details: <http://dev.mysql.com/doc/mysql/en/Privilege_system.html> and 
<http://dev.mysql.com/doc/mysql/en/GRANT.html>.

Michael

Paul Stearns wrote:

> Ignore the sentence that starts Remember...
> 
> When I telnet to port 3307 on the DB server from the web server I get the version, a 
> few characters of garbage and it disconnects.
> 
> Paul
> 
> 
> -----Original Message-----
> From: Paul Stearns [EMAIL PROTECTED];]
> Sent: 8/15/2004 6:01:59 PM
> To: [EMAIL PROTECTED]
> Subject: ASP Connection to Mysql fails
> 
> I have an ASP application running on a server with a mysql DB, everything works 
> great. I connect using localhost, no problems.
> 
> I have a second mysql DB on another server. I connect to it via the odbc Data Source 
> Administrator from the web server with no problems.
> 
> When I try to connect from an ASP script from the web server using the following;
> 
> =========
> Set connMailServer = Server.CreateObject("ADODB.Connection")
> 
> ConnectString = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=myserver.com; USER=root; 
> PASSWORD=rootPW; DATABASE=myDB; PORT:3307; OPTION=35;"
> 
> IntDebug=connMailServer.Open(ConnectString)
> =========
> 
> The server, user, password, database and port are what I used in the odbc Data 
> Source Administrator. Remember I can connect to my local DB from ASP.
> 
> I receive the following error;
> 
> ==========
> 
> Microsoft OLE DB Provider for ODBC Drivers error '80004005' 
> 
> [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'myserver.com' (10061)
> 
> =========
> 
> The environment is w2k server on both computers. The MYSql version on remote server 
> is 4.0.17.
> 
> I'm so confused...
> 
> Paul
>

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to