In both my server (that hosts SQLS server) and my Pc, I have this entry in the hosts file:
I am using Windows Authentication to log into the SSMS.
Using servername MYSQLSERVER
in the SSMS on my Pc, I have no problems logging in, but if I try the same in SSMS (in the server), then I get this error:
TITLE: Connect to Server
------------------------------
Cannot connect to MYSQLSERVER.
------------------------------
ADDITIONAL INFORMATION:
Login failed. The login is from an untrusted domain and cannot be used with Integrated authentication. (Microsoft SQL Server, Error: 18452)
For help, click: https://docs.microsoft.com/sql/relational-databases/errors-events/mssqlserver-18452-database-engine-error
------------------------------
BUTTONS:
OK
------------------------------
I have tried replacing the ip in the hosts file with 127.0.0.1 MYSQLSERVER
and with ::1 MYSQLSERVER
but it's the same problem.
I need to be able to log into SSMS on the server using a host name from the hosts file - and not using localhost or the real servername.
Any idea what I am doing wrong?