将Godaddy服务器连接到远程服务器数据库 [英] Connecting Godaddy server to Remote server database

查看:175
本文介绍了将Godaddy服务器连接到远程服务器数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我已经在Godaddy托管了带有mysql数据库的网站,并且该网站运行正常,但是我有另一个位于其他地方的数据库,当我尝试使用我的凭据进行连接时,它无法正常工作,请指定如何连接从我的godaddy服务器访问该数据库

(这意味着在godaddy服务器中的web.config,iis7中进行设置)


注意:-我的凭据是完美的,并且相同的连接字符串正在连接到我的服务器数据库,
连接字符串为

Hi,

I had hosted the website with mysql database in Godaddy,and it was working fine, but i had the other database which was located at some other place,when i am trying Connect with my credientls,it was not working , please Specify How to connect to that databse From my godaddy server

(It means Setting in web.config,iis7 in godaddy server )


Note:- My credentials are prefect, and same connecting string was Connecting to the my server database,
Connecting string was

<add name="cona" connectionstring="server=serveripaddress;database=databasename;uid=root;pwd=pwd;allow zero datetime=yes" />




请指定解决方案
.
感谢Q In adavanced

[edit]已编码HTML标记,添加了代码块-OriginalGriff [/edit]




Please specify me the Solution
.
Thank Q In adavanced

[edit]HTML tags encoded, code block added - OriginalGriff[/edit]

推荐答案

我可以想到的两个可能性:
1)IP已磨损,或者在您的网络中是本地的.
2)数据库服务器设置为不接受远程连接.

首先检查您使用的IP地址:如果它以192开头,那么它是本地IP,而不是Internet,因此您将无法从GoDaddy看到它.
如果没有,请尝试通过Visual Studio连接.

尝试使用服务器资源管理器"窗格在VS中建立连接:
1)打开服务器资源管理器.
2)右键单击数据连接",然后选择添加连接"
3)在随后的对话框中,选择您的数据源和数据库,指定安全信息,然后按测试连接"按钮.
4)连接正常后,按确定"
5)在服务器资源管理器"窗格中突出显示您的数据库,然后查看属性"窗格.将显示一个连接字符串的工作示例,您可以将其复制并粘贴到您的应用程序或配置文件中.
Two possibilties that I can think of:
1) The IP is worng, or is local to your network.
2) The DB server is set not to accept remote connections.

Check the IP address you are using first: if it starts with 192 then it is a local IP, not internet, so you won''t be able to see it from GoDaddy.
If it doesn''t, then try connecting via Visual studio.

Try setting up a connection in VS with the Server Explorer pane:
1) Open Server Explorer.
2) Right click "Data connections" and select "Add connection"
3) In the dialog that follows, select your DataSource, and database, specify the security info, and press the "Test connection" button.
4) When the connection works, press "OK"
5) Highlight your database in the Server Explorer pane, and look at the Properties pane. A working example of the connection string will be shown, which you can copy and paste into your app or config file.


这篇关于将Godaddy服务器连接到远程服务器数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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