-- 1. 创建登录账号
USE [master];GOCREATE LOGIN [test-user] WITH PASSWORD = 'xysu7SZ193SNX6E{ {HxubPE3}vr',DEFAULT_DATABASE = [MyPost];;-- 2. 创建数据库账号USE [MyPost];GOcreate user [test-user] for login [test-user] with default_schema=dbo;-- 3. 分配数据库权限exec sp_addrolemember 'db_owner', [test-user]