navicat,myeclipse,idea远程连接SQL Server数据库方法
作者:mmseoamin日期:2023-12-21
navicat,myeclipse,idea远程连接SQL Server数据库方法
没有安装的同学可以看我之前的文章,详细描述了SQL Server2022和SSMS连接的过程
SqlServer2022服务器安装详细图文教程和SSMS数据库工具下载安装
演示工具环境:Navicat16,Myeclipse2017,IDEA2023 和 SQL Server2022
1、通过SSMS连接SQL server后设置登陆方式和远程连接用户
1.1、本地登录后,右击登录的服务器点击属性,设置登陆方式为混合登录


1.2、设置连接为允许远程连接该服务器,确定即可。

1.3、点击安全性-登录名

sql server默认用户时sa用户,也可以自己创建一个新的用户
1.4、双击或右键属性,设置sa用户的密码和允许远程

再点击状态,授予和启用!然后点击确定

2、在开始应用菜单,打开SQL Server2022配置管理器,设置网络协议中的TCP/IP为启用状态!


2.1、设置IPALL端口号为SQL server默认端口号1433,动态端口不用管就行。

2.2、设置后会提示要重启服务器,一定要进行重启服务器,不然还是不能进行远程连接

2.3、重启后再打开SSMS使用sa用户进行sql身份验证登录

3、关闭防火墙后使用Navicat进行远程连接SQL server

连接成功后就可以对SQL server上的数据库进行操作了,在dbo中进行新建表

4、使用Myeclipse远程连接SQL server服务器
4.1、窗口——显示视图——打开DB Browser视图(如果没有该视图,则点击Perspective——DB Explore)

4.3、在DB Browser视图中右键,新建数据库连接

4.4、按下图填写对应信息,使用sa用户登录,添加对应驱动jar包

4.5、测试连接成功,点击完成

然后就可以对数据库进行操作了

5、使用idea连接
使用idea的连接可以看我之前的那篇连接MySQL的文章,步骤一模一样!
IDEA——连接MySQL数据库,创建库和表