When a central bank buys government securities, is this exactly equivalent to printing money?
I don't know if you are aware that you are using the word "print" abusively but:


  The U.S. Treasury controls the printing of money in the United States. However, the Federal Reserve Bank has control of the money supply through its power to create credit with interest rates and reserve requirements.


Source : https://www.investopedia.com/ask/answers/082515/who-decides-when-print-money-us.asp

Thus both are correct. Clearly a CB does not increase the money supply by creating credits in order to buy governments securities. 

It does so with other goals in mind, such as forging economic cycles, maintaining financial stability, reconfiguring the debt market and/or stimulating money multipliers in the national economy. 

A CB (theoretically)(and indirectly) buys government securities in an inflation-neutral manner $\iff$ no money printed $\iff$ it uses the existing "stock of (scriptural) cash".


The difference between your two scenarios is the notion of debt. Strongly putting aside the fact that your ex-nihilo first scenario literally makes no sense without a credit underlier.