title: Mysql Error 1130: Unknown domain connecting to my server
body: <p>I noticed an odd mysql error while testing a prototype site(containing php and a mysql database) for a client and it has me worried/confused. Forgive me if this is a simple or obvious question but I have not been able to find articles that adequately explain this. </p>
  
  <hr>
  
  <p><strong>Situation:</strong>
  While clicking through the site I received the following error message:
  "Connect Error (1130) Host 'kingdomofkicks.co.uk' is not allowed to connect to this mysql server"</p>
  
  <p>This is confusing because "kingdomofkicks.co.uk' means absolutely nothing to me. For the record our site is hosted on Dreamhost.com.</p>
  
  <p>The php/mysql code that threw the error is:    </p>
  
  <pre><code>  //connect to the database
      $mysqli = new mysqli("$dbhost", "$dbuser", "$dbpass", "$dbname");
      //If any errors occur, kill the script and display the error. 
      if ($mysqli-&gt;connect_error) {
          die('Connect Error (' . $mysqli-&gt;connect_errno . ') '. $mysqli-&gt;connect_error);
      }
  </code></pre>
  
  <p>The site was working fine prior to this error and after a refresh it seems to be working just fine now. </p>
  
  <p>Furthermore, I looked into the mysql server to see if there is anything that odd and noticed that the user was listed as [myusername]@kingdomofkicks.co.uk. I never noticed this prior to now.</p>
  
  <hr>
  
  <p><strong>My questions:</strong></p>
  
  <ol>
  <li><p>What happened that caused this error to be displayed?</p></li>
  <li><p>Is this something that I need to be worried about? In particular since my mysql user appears to be listed under this domain now. </p></li>
  <li><p>Is there something that I can do to defend/protect against this in the future?</p></li>
  </ol>
  
  <p>Thank you in advance for your help.</p>