How returns lost memory to sql server

One day I made a mistake. I set the sql server memory to 8MB instead of 8000MB. by using management studio. After this smart action sql server immediately went down. What now?

C:\Program File...\MSSQL\Binn>sqlservr.exe -dD:\MSSQL13.<INSTANCE>\MSSQL\DATA\master.mdf -eD:\MSSQL13.<INSTANCE>\MSSQL\Log\ERRORLOG -lL:\MSSQL13.<INSTANCE>\MSSQL\DATA\mastlog.ldf -f -s <SERVER>\<INSTANCE>
C:\Program File...\MSSQL\Binn>sqlcmd -E -S <SERVERNAME>\<INSTANCE>
1> EXEC sp_configure 'max server memory', 8000;
2> GO

 

How to change MSSQL sa password

In fist time you must admin acces to Windows server.

Then go to the cmd.exe and run next commands:

C:\Program File...\MSSQL\Binn> net start MSSQL$<INSTANCE> /m"SQLCMD"
   NET START
   service succesfully started

C:\Program File...\MSSQL\Binn> sqlcmd -S <SERVERNAME>\<INSTANCE>
1> CREATE LOGIN mylogin WITH PASSWORD='mypassword'
2> GO
3> SP_ADDSRVROLEMEMBER mylogin, SYSADMIN'
4> GO
5> exit

C:\Program File...\MSSQL\Binn> net stop MSSQL$<INSTANCE>
  NET STOP
  service

 

Thats all.