In view of problem that database system of a Coal Mine Machinery Manufacturing Enterprise has many users and influences its safety performance, the paper proposed a design scheme of security mechanism of database system based on SQL Server. It introduced design of selection of login mode, application procedure confirmation, creation of SQL Server group, setting of database access, setting and assignment of user authority and other safety mechanisms in details. It indicated that when designing the security mechanism, it firstly should create global group, obtain server access through SQL Server Users group, obtain access authority of database through specific database group, and then should create database roles and assign authority to the roles according to access requirements of users, at last the global group obtains authority through adding the roles, so as to ensure safety of the database system. The actual application validates feasibility and effectiveness of the security mechanism.