title: MySQL replication - Error connecting to master
body: <p>I'm trying to set up replication in MySQL but I am being given an error that I do not know how to fix -</p>
  
  <blockquote>
    <p>ERROR 1218 (08S01): Error connecting to master: Host 'sh047.mydomain.com' is not allowed to connect to this MySQL server</p>
  </blockquote>
  
  <p>I've added the following code to the master my.ini -</p>
  
  <pre><code>server-id=238429
  log-bin=mysql-bin
  log-error=mysql-bin.err
  binlog_do_db=my_databases_to_replicate {not literal, have listed the correct databases}
  </code></pre>
  
  <p>And I've added this to the slave my.ini -</p>
  
  <pre><code>server-id=2
  master-host=192.168.1.15
  master-user=replication
  master-password=my_password
  master-connect-retry=60
  replicate-do-db=my_databases_to_replicate
  </code></pre>
  
  <p>The user 'replication' exists and the password that I use in the slave my.ini is correct. Any suggestions as to how to fix this would be welcome.</p>
  
  <p>Thanks.</p>