469,916 Members | 2,147 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,916 developers. It's quick & easy.

Need Help

bhv
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="VBSCRIPT"%>
<!-- #INCLUDE file="db.inc" -->
<%

dim adoConn

set adoConn = Server.CreateObject("ADODB.Connection")

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

if adoConn.errors.count = 0 then

response.write "Connected Successfully!"

end if
%>

<html>
<head>
<title>welcome</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

Mar 31 '06 #1
2 1371
bhv wrote:
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="VBSCRIPT"%>
<!-- #INCLUDE file="db.inc" -->
<% dim adoConn set adoConn = Server.CreateObject("ADODB.Connection") adoConn.Open "Driver=" & dbDriver & "; SERVER=localhost; Database=" &
dbDatabase & "; Uid=" & dbUser & ";Pwd=" & dbPassword & ";OPTION=3;" if adoConn.errors.count = 0 then response.write "Connected Successfully!" end if
%> <html>
<head>
<title>welcome</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

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;

Mar 31 '06 #2
bhv
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

Apr 1 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by mike | last post: by
5 posts views Thread by John Flynn | last post: by
reply views Thread by xunling | last post: by
7 posts views Thread by Timothy Shih | last post: by
8 posts views Thread by skumar434 | last post: by
reply views Thread by U S Contractors Offering Service A Non-profit | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.