Can't connect to MySql on localhost?

Can't connect to MySql on localhost?

Try using 127.0.0.1 instead of localhost. Because when you use "localhost"
mysql tries to connect to a local socket, that is not available in the
default location in our service. For example:

this->connection = mysqli_connect("127.0.0.1", "w_username",
"my_password", "database name", mysql_port);

Remember to replace the username, password, database name and mysql_port above.

You can find your mySQL port and password in the file ~/.my.cnf
You'll have to access that file through sftp.