Terminal Commands not working

  An exception occurred in driver: SQLSTATE[HY000] [2002] No such file or directory- error is shown when I execute commands in terminal

Can this be because of MariaDB Version, or PHP Version?

I got a solution to this problem. This is a permission issue. Would have been great if Shopware displayed the correct error.

We asked our server provider and they granted all the permissions for the user, also all MYSQL permissions should be granted.

You should also check the php version to satisfy the shopware reqirements for the ssh.