Connection Failed Error on Woocommerce Registration page

I hope you are doing well.

I recently took over a Wordpress site that uses Woocommerce, from another developer and also moved the site over to my hosting company. Since the move I've received the following error on a registration page: Connection failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)

this is the page:

I would really appreciate your help with this. Let me know if you need anything else.