Where the database is doesn't matter for connecting. As long as you use
the correct credentials and functions, it will connect.
If you see any connection method( PDO, mysqli etc ), it doesn't show the
operating system anywhere. Database is running on top of the operating
check for errors in each step. Example:
$link = mysqli_connect("myhost","myuser","mypassw","mybd") or
die("Error " . mysqli_error($link));