ASP源代码和数据库在2个不同的远程服务器上

时间:2021-12-08 11:40:41

I have hosted my website. But I do not have database privileges. Since i want to include CONTACT form in my website, I had created an asp page in my server (A) and created mysql database in another web server B(with the help of a friend who has created a db in her domain)

我托管了我的网站。但我没有数据库权限。由于我想在我的网站中包含CONTACT表单,我在我的服务器(A)中创建了一个asp页面并在另一个Web服务器B中创建了mysql数据库(在她的域中创建了db的朋友的帮助下)

register.asp (resides in A)

register.asp(居住在A)

<!--#include virtual="http://some_server_name.com/connect.asp"-->


connect.asp (resides in B)

Dim con_project
Dim connstring
set con_project = Server.CreateObject("ADODB.Connection")
ConnString = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER='host ipaddress';Port=3306; DATABASE='db_name'; " &_
"UID='uname';PASSWORD='pwd'; OPTION=3;"

When I run the asp file , I get this error msg.

当我运行asp文件时,我收到此错误消息。

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

Microsoft OLE DB Provider for ODBC Drivers错误'80004005'

[MySQL][ODBC 3.51 Driver]Client does not support authentication protocol requested by server; consider upgrading MySQL client

[MySQL] [ODBC 3.51驱动程序]客户端不支持服务器请求的身份验证协议;考虑升级MySQL客户端

/wah/includes/connect.asp, line 34

/wah/includes/connect.asp,第34行

any help? any help?

任何帮助?任何帮助?

1 个解决方案

#1


0  

What it's saying is basically the client does not support the type of authentication you use.

它的含义基本上是客户端不支持您使用的身份验证类型。

I am not sure why you would use server attributes on your connection string since your connect.asp reside in the same server as your database. Care to explain this?

我不确定为什么要在连接字符串上使用服务器属性,因为connect.asp与数据库位于同一服务器中。小心解释一下?

Please try if this work:

请尝试这项工作:

Dim con_project
set con_project = Server.CreateObject("ADODB.Connection")
con_project.Provider="MySQL ODBC 3.51 Driver"
con_project.Open "c:/webdata/northwind.mdb"

#1


0  

What it's saying is basically the client does not support the type of authentication you use.

它的含义基本上是客户端不支持您使用的身份验证类型。

I am not sure why you would use server attributes on your connection string since your connect.asp reside in the same server as your database. Care to explain this?

我不确定为什么要在连接字符串上使用服务器属性,因为connect.asp与数据库位于同一服务器中。小心解释一下?

Please try if this work:

请尝试这项工作:

Dim con_project
set con_project = Server.CreateObject("ADODB.Connection")
con_project.Provider="MySQL ODBC 3.51 Driver"
con_project.Open "c:/webdata/northwind.mdb"