I have a development instance of mssql that I keep forgetting the damn password on.
It sure is a good thing it’s easy to reset 🙂 Run the following commands as root.
stop the service
systemctl stop mssql-server
set sa password:
[root@ms-sql ~]# /opt/mssql/bin/mssql-conf set-sa-password
Enter the SQL Server system administrator password:
Confirm the SQL Server system administrator password:
Configuring SQL Server…
ForceFlush is enabled for this instance.
ForceFlush feature is enabled for log durability.
The system administrator password has been changed.
Please run ‘sudo systemctl start mssql-server’ to start SQL Server.
systemctl start mssql-server
Now you should be able to connect like so:
sqlcmd -S SQLInstanceName -U UserName -P Password