[thelist] MySQL Drivers on Win2K

Michele Foster (WizarDev) michele at wizardev.ca
Sat Jan 15 09:52:51 CST 2005


Hey Matt,

----- Original Message ----- 
From: "Matt Warden" <mwarden at gmail.com>


> Hi Michele,
>
> On Fri, 14 Jan 2005 23:45:44 -0500, Michele Foster (WizarDev)
> <michele at wizardev.ca> wrote:
> > I can't get my ASP pages to run locally under IIS (win2K) and access a
> > remote database.  Both MySQL and SQL Server databases.  Though it is
MySQL
> > that I'm struggling to get working at the moment.  I suspect it has
> > something to do with permissions on the IUSER_mymachine account that
runs
> > the ASP pages, but I've been unable to figure out how to fix it.
>
> Are you certain that your mysql user has permissions to access the
> database from your hostname? When a user is granted permissions on a
> database (or tables or some other database object), it is specific to
> a certain hostname, unless the hostname is the wildcard character. See
> the GRANT syntax:
>
> http://dev.mysql.com/doc/mysql/en/GRANT.html

I don't think this is the issue, as I can connect to the db from f2o to my
other host where the DB is located.
http://mich.f2o.org/db.asp


> If I were you, I would ask this list:
> http://lists.mysql.com/myodbc

Yes, I will probably end up doing just that .. I've been searching their
archives to find an answer, but haven't come across it yet.

>
> It might also help to see your connection string.

        Set cnn = Server.CreateObject("ADODB.Connection")

        cnn.Open "Driver={MySQL ODBC 3.51
Driver};Server=megasqlservers.com;" &_
         " DATABASE=rhf_letshookrugs_com;" &_
         " UID=dbm.letshookrugs.com;PWD=yadda;option=3;"

        Set rs = Server.CreateObject("ADODB.Recordset")
        SQL = "SELECT * from test"
        rs.Open SQL,cnn,1,3

        do until rs.eof
        response.write rs("test")
        rs.movenext
        loop

Which results in this error locally:
        Microsoft OLE DB Provider for ODBC Drivers error '80004005'

        [MySQL][ODBC 3.51 Driver]Access denied for user:
'dbm.letshookrugs at ip216-239-89-117.vif.net' (Using password: YES)

        /db.asp, line 9

If I change the driver to just {MySQL}then the error is:

        Microsoft OLE DB Provider for ODBC Drivers error '80004005'
        [Microsoft][ODBC Driver Manager] Data source name not found and no
default driver specified

        /db.asp, line 9

I've tried having no "option", using the option value as suggested in the
links below, removing it altogether, adding port and stmt, nada.


> You might also try, when you create the system DSN to test, to click
> the button that tests the connection (it has been a long time, but I
> seem to remember there being one). That could help isolate the
> problem.


The system DSN fails too, with an error that is like the first one above.
"Access denied for user ..."

MySQL Front is working fine, I can connect to the database using it from
home.

>
> You probably have come across these already, but just in case:
> http://forums.devarticles.com/archive/t-4609
>
http://www.able-consulting.com/MDAC/ADO/Connection/ODBC_DSNLess.htm#ODBCDriverForMySQL
>


No luck with any of those suggestions.  I could ask my host to create a DSN
and see if that works.  I'm just perplexed that it works on f2o, but not
locally, so I'm not sure s DSN is going to solve the problem.

I'm afraid Ken's response was very much over my head.  :(

Any other suggestions?

Thanks,

Mich



More information about the thelist mailing list