Need Help

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • bhv

    #1

    Need Help

    hello everybody. i am new to MySQL and want to build some asp pages
    providing search facility where search result displays from database. i
    have successfully created database in MySQL 5.0, but i can't show them
    in asp pages. the browser gives me following error:

    Error Type:
    Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    [MySQL][ODBC 3.51 Driver]Access denied for user: 'a@localhost' (Using
    password: YES)
    list.asp, line 9

    i have used connection strings. the file i have included in aps page is
    db.inc as follows:

    <%

    dim dbDriver

    dim dbDatabase

    dim dbUser

    dim dbPass

    dbDriver = "{MySQL ODBC 3.51 Driver}"

    dbDatabase = "bhv"

    dbUser = "a"

    dbPassword = "a"

    %>

    where as the file i used to show data is list.asp as follows:

    <%@LANGUAGE="VB SCRIPT"%>
    <!-- #INCLUDE file="db.inc" -->
    <%

    dim adoConn

    set adoConn = Server.CreateOb ject("ADODB.Con nection")

    adoConn.Open "Driver=" & dbDriver & "; SERVER=localhos t; Database=" &
    dbDatabase & "; Uid=" & dbUser & ";Pwd=" & dbPassword & ";OPTION=3; "

    if adoConn.errors. count = 0 then

    response.write "Connected Successfully!"

    end if
    %>

    <html>
    <head>
    <title>welcom e</title>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1">

    </head>

    <body>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    </body>
    </html>

    pl. help me

  • noone

    #2
    Re: Need Help

    bhv wrote:
    [color=blue]
    > hello everybody. i am new to MySQL and want to build some asp pages
    > providing search facility where search result displays from database. i
    > have successfully created database in MySQL 5.0, but i can't show them
    > in asp pages. the browser gives me following error:[/color]
    [color=blue]
    > Error Type:
    > Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    > [MySQL][ODBC 3.51 Driver]Access denied for user: 'a@localhost' (Using
    > password: YES)
    > list.asp, line 9[/color]
    [color=blue]
    > i have used connection strings. the file i have included in aps page is
    > db.inc as follows:[/color]
    [color=blue]
    > <%[/color]
    [color=blue]
    > dim dbDriver[/color]
    [color=blue]
    > dim dbDatabase[/color]
    [color=blue]
    > dim dbUser[/color]
    [color=blue]
    > dim dbPass[/color]
    [color=blue]
    > dbDriver = "{MySQL ODBC 3.51 Driver}"[/color]
    [color=blue]
    > dbDatabase = "bhv"[/color]
    [color=blue]
    > dbUser = "a"[/color]
    [color=blue]
    > dbPassword = "a"[/color]
    [color=blue]
    > %>[/color]
    [color=blue]
    > where as the file i used to show data is list.asp as follows:[/color]
    [color=blue]
    > <%@LANGUAGE="VB SCRIPT"%>
    > <!-- #INCLUDE file="db.inc" -->
    > <%[/color]
    [color=blue]
    > dim adoConn[/color]
    [color=blue]
    > set adoConn = Server.CreateOb ject("ADODB.Con nection")[/color]
    [color=blue]
    > adoConn.Open "Driver=" & dbDriver & "; SERVER=localhos t; Database=" &
    > dbDatabase & "; Uid=" & dbUser & ";Pwd=" & dbPassword & ";OPTION=3; "[/color]
    [color=blue]
    > if adoConn.errors. count = 0 then[/color]
    [color=blue]
    > response.write "Connected Successfully!"[/color]
    [color=blue]
    > end if
    > %>[/color]
    [color=blue]
    > <html>
    > <head>
    > <title>welcom e</title>
    > <meta http-equiv="Content-Type" content="text/html;
    > charset=iso-8859-1">[/color]
    [color=blue]
    > </head>[/color]
    [color=blue]
    > <body>
    > <p>&nbsp;</p>
    > <p>&nbsp;</p>
    > <p>&nbsp;</p>
    > </body>
    > </html>[/color]
    [color=blue]
    > pl. help me[/color]


    make sure you created the username/passwd correctly..
    how did you create the user and did you make sure you granted that user
    access to the database and tables?

    connect to the database and
    select host,user from mysql.user;



    Comment

    • bhv

      #3
      Re: Need Help

      thank u very much for quick help. i had not createuser. during
      installation when it asked me suername and p/w i had entered "a" and
      trying to connect with this itself. is this proper way or i am doing
      wrong???? now i am trying to create user as per ur suggestion i have
      downlod some files and going thru them.

      thanks

      Comment

      Working...