web.config中的连接字符串到不同的数据库服务器 [英] web.config connection string to different database server

查看:128
本文介绍了web.config中的连接字符串到不同的数据库服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的web.config 2康恩串
他们的第二个连接到外部数据库 - 数据库是不同的服务器比目前的网站

I have two conn strings in my web.config The second of them connects to external database - the database is on different server than the current website.


  1. 这可能吗?

  2. 我怎样写我的连接字符串?

我现在有这样的:

<add name="newConn" connectionString="server=www.somedomain.com;database=dbname;user id=dbuser;password=dbpass" providerName="MySql.Data.MySqlClient" />

但我发现了错误说:

But I'm getting error saying:

拒绝用户dbuser'@'currentdnsserver.com访问(使用密码:YES)

感谢

推荐答案

我想建立连接是不同的托管服务器(一个在Windows上,另一个在Linux上)之间。

The connection I wanted to establish was between different hosting server (one on Windows, another on Linux).

我的托管服务提供商告诉我,这是不可能从Windows .NET网站到Linux的MySQL数据库,以connecto。不知道为什么,但不可能的。

My hosting provider told me it's not possible to connecto from Windows .NET website to Linux MySQL db. Not sure why but not possible.

将有可能在同一个托管他们说。

Would be possible on the same hosting they said.

感谢您想帮助@T基翁

这篇关于web.config中的连接字符串到不同的数据库服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆