title: mysqli_connect(): (HY000/2003): Can't connect to MySQL server on 'domain name' (111)
body: <p>Im very new to php and my SQL, and am having trouble connecting to my SQL Database. Im getting the following error when i submit my HTML Form.</p>
  
  <pre><code>mysqli_connect(): (HY000/2003): Can't connect to MySQL server on 'domain name' (111)
  </code></pre>
  
  <p>Here is my php code:</p>
  
  <pre><code>&lt;? 
  
   $name=$_POST['name']; 
   $email=$_POST['email']; 
   $location=$_POST['location']; 
   mysqli_connect("domain_name", "1645347_data", "*password omitted*") or die(mysql_error()); //error getting thrown at this line
   mysqli_select_db("1645347_data") or die(mysql_error()); 
   mysqli_query("INSERT INTO `data` VALUES ('$name', '$email', '$location')"); 
   Print "Your information has been successfully added to the database."; 
   ?&gt;
  </code></pre>
  
  <p>As you can see, it is a very simple php script (as I am following a tutorial).</p>
  
  <p>Can anybody see why i would be getting this error? im more than happy to provide additional information if requested.</p>