How to Grant CONNECT on a Mirroring Endpoint in SQL Server

To Grant CONNECT on a previously created Mirroring Endpoint in SQL Server run following query:

USE master;
GO
CREATE LOGIN [domain_name\user_name] FROM WINDOWS;
GO
GRANT CONNECT on ENDPOINT::Mirroring_Endpoint_Name TO [domain_name\user_name];
GO