Error connection to database when trying to restore a site

Hi, I’m trying to recover a site that I deleted by mistake. I still have all the original files including SQL’s files. I’m following the instructions from this link How can I restore a site from a Local site folder?, but at 6th point, I get this error message: ** (myloader:245): CRITICAL **: Error connection to database: Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (111). How could I solve it? Thank you