公司建设个网站,单一本地门户网站源码,手机兼职赚钱一单一结50元,受欢迎的杭州网站建设本文讲SqlServer Express版本在登录的时候#xff0c;
如何由Windows认证#xff0c;修改为Sql Server Express认证。
目录
1#xff0c;SqlServer Express的Windows认证
2#xff0c;修改为混合认证
3#xff0c;启用sa 用户
4#xff0c;用sa 用户登录 下面是详细…本文讲SqlServer Express版本在登录的时候
如何由Windows认证修改为Sql Server Express认证。
目录
1SqlServer Express的Windows认证
2修改为混合认证
3启用sa 用户
4用sa 用户登录 下面是详细内容。
1SqlServer Express的Windows认证
SqlExrepss版本安装完之后默认的是Windows认证的。
就是下面这个样子的Authentication选为 Windows Authentication选项。
然后你看到用户名都不是sa也没法输入。
这个样子当然是可以登录的到数据库的但是你装数据库也不是自娱自乐的吧而是为了在VS.Net或其他环境当中进行连接的是吧像这种那你怎么连接呢 那你说Authentication下拉框改成 SQL Server Authentication不行吗 出错了错误信息如下
TITLE: Connect to Server ------------------------------
Cannot connect to MYPC22\SQLEXPRESS.
------------------------------ ADDITIONAL INFORMATION:
A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - 证书链由不受信任的机构颁发。) (Microsoft SQL Server, Error: -2146893019)
For help, click: https://docs.microsoft.com/sql/relational-databases/errors-events/mssqlserver--2146893019-database-engine-error
------------------------------
证书链由不受信任的机构颁发。
------------------------------ BUTTONS:
OK ------------------------------ 这个怎么办呢其实就是先进去然后修改成混合认证就可以了。
2修改为混合认证
改回Windows认证然后点Connect先进去 右键数据库节点点Properties 点 Security
然后就可以在 Server authentication部分修改为 SQL Server and Windows Authentication mode 提示说要重启示例点OK 说实话Express版本做得真实太简了
你直接给我重启得了呗还得手动来
右键节点 Restart 点 Yes 3启用sa 用户
一般做示例之类的大家也就懒得再去创建用户直接就想用sa用户这里来说明一下如何启用。
点 Security Logins sa
右键 sa点 Properties 设定Password
我这里就偷懒不设置密码了都为空 点 Status
Login选 Enabled 回到登录画面
- AuthenticationSQL Server Authentication
- Login: sa
- Password:空白 空白密码好像不太行哈。
TITLE: Microsoft SQL Server Management Studio ------------------------------
Enable Login. failed for Login sa. (Microsoft.SqlServer.Smo)
For help, click: https://go.microsoft.com/fwlink?ProdNameMicrosoftSQLServerProdVer17.100.40.0EvtSrcMicrosoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionTextEvtIDEnableLogin.LoginLinkId20476
------------------------------ ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
您不能启用空白密码登录。 (Microsoft SQL Server, Error: 15510)
For help, click: https://docs.microsoft.com/sql/relational-databases/errors-events/mssqlserver-15510-database-engine-error
------------------------------ BUTTONS:
OK ------------------------------ 重新设置密码
csdn-shi_ly 点 OK按钮
回到 sa现在上面已经没有×了也就是可以用了。 4用sa 用户登录
回到登录画面
- AuthenticationSQL Server Authentication
- Login: sa
- Password:自己设定的密码 又出 证书链由不受信任的机构颁发 错误。
这是为啥呢 Connection Security:
- Encryption: Optional (可选
加密由必须(Mandatory)改为Optional(可选)再点Connect 这回就OK了。 TODO难道sa本来就可用只是因为没有加证书而已。
欢迎朋友们研究一下并留言。 以上就是本篇的全部内容。
更多文章请点击东京老树根的博客主页
东京老树根-CSDN博客