When I connect to my MySQL database locally I use:
$host = 'localhost';
$db = 'myDB';
$user = 'root';
$pass = '';
When my site resides on remote server I use the following parameters to make a MySQL connection:
$host = 'localhost';
$db = 'myDB';
$user = 'myUuserName';
$pass = 'myPAss';
What is strange that I use for both $host = 'localhost'; and it works also on remote server? Why? How is it possible? Shouldn't it be my domain name instead of 'localhost'?