SQL使用登录名连接数据库报错(错误代码18456问题)
目录
- 解决办法
错误代码 18456 表示 SQL Server 登录失败。这个错误通常表示提供的凭据(用户名和密码)无法成功验证或者没有权限访问所请求的数据库。


错误:
18456
是因密码或用户名错误而使身份验证失败,如果用户名密码正确,则该登录名没有连接数据库引擎权限,登录权限也被无情剥夺了,开启服务器【SQL Server身份验证模式】即可解决办法
以windows验证模式进入数据库管理器

右键【服务器】选择【属性】

修改服务器身份验证【SQL Server和Windows 身份验证模式】,开启SQL Server登录

重新启动,配置生效

右键【服务器】选择【重新启动】

重新启动之后,再次使用登录名进行连接

显示【登录名】连接成功

到此这篇关于SQL使用登录名连接数据库报错(错误代码18456问题)的文章就介绍到这了,更多相关SQL 登录名连接数据库报错内容请搜索电脑手机教程网以前的文章或继续浏览下面的相关文章希望大家以后多多支持电脑手机教程网!