MySQL replication - Error connecting to master
The error message says it all:
Host 'sh047.mydomain.com' is not allowed to connect to this MySQL server
Make sure the user replication
is configurated as [email protected]
(or, but only for testing purposes: replication@%
) on your master database.
If this doesn't work out, check the MySQL Documentation for this, there might be one or two special cases (Linux compilation etc.), where that error might occur, too.
David Gard
Updated on June 04, 2022Comments
-
David Gard almost 2 years
I'm trying to set up replication in MySQL but I am being given an error that I do not know how to fix -
ERROR 1218 (08S01): Error connecting to master: Host 'sh047.mydomain.com' is not allowed to connect to this MySQL server
I've added the following code to the master my.ini -
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}
And I've added this to the slave my.ini -
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
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.
Thanks.