excel 远程连接mysql,使用Excel连接到远程SQL数据库

I'm using SQL Server 2008 R2 and Microsoft Excel.

I have the server set up to be logged in via Windows user or database user

I can log into the database fine with the database user

I can connect to the database with my Silverlight app

I cannot figure out how to connect from a remote PC in Excel

I went to Excel -> Data - > From other sources -> From SQL Server

My server name is WIN2K8-01\DATABASENAME, so in Excel I typed in IP\WIN2K8-01\DATABASENAME with the username and password.

解决方案

There can be several reasons for which you cannot connect to your SQL Server:

A) It doesn't admit remote connections

B) There's a firewall or anything else that avoids remote computers connections

C) You don't have SQL Browser service running

Troubleshooting steps:

1) In a remote computer open cmd and run ping win2k8-01 You should get responses from your computer. if not, there's a network connectivity problem

2) Check that the "SQL Browser service" is running in your computer (Services, in Administrative tools, in Control panel) If not set it start type as automatic and start it. This allows remote computers to get information about available instances and how to connect to them. If in doubt, look here

4) Verify that your server allows remote connections. To do this open SSMS, connect to your server, right click, open Properties, and look for "Allow remote connections" on "Connections" tab. get sure this option is checked. If in doubt, look here

5) Disable firewall in your computer (windows firewall or any 3rd party firewall like those installed by antivirus software)

Try connecting using the same connection configuration that worked in your local computer. It should work now.

If you cannot connect using Excel you should try connecting with another tool from the remote computer (you can install SSMS on that computer and try connecting).

This should work. if not let me know what is failing.

If it's working, enable firewall again and try connecting again. If you cannot, you need to configure your firewall to allow SQL Server connections. Do that and try again. Don't forget to allow connections to SQL Server browser on UDP port 1434, apart form the DB instance port on TCP.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值