The error you were getting was because the mysql service went down.
@JoEz is right, 512Mb of RAM is too less, use a 1Gb Droplet or more. Scaleway gives 2Gb RAM VPS for 3 Euro/ Month, you can have a look at that as well.
Also, when you install using the command :
python install.py --production --user frappe
you create a new user called frappe and all the files are installed there, so to do anything related to bench , you actually want to switch to that user first by doing su frappe
from root, and then run commands. Also the reason you can’t see bench folder is because the naming was changed from bench-repo to .bench (which works as a hidden folder) if you do ls -a
you will see it just fine.