It is quite common to not have the slave in read_only mode..
in fact, if you do not set it yourself, then it never is enabled..
A good question, is why you would actually want to set it...???
Are you trying to protect mistakes? or errors made my admin users??? or the application?
Considering MANY admins are using MySQL as root anyways, where is the protection here??
You cant exactly protect your data as you would imagine ( as everything replicated into the slave anyway )
You do know that any user with super privileges and the replication thread do not abide by the read_only??
A strong structured approach to users and privileges is the correct way to deal with replication issues, not a read_only configuration on the slave
In my honest opinion, it actually does not protect very much...or useful for anything besides stopping a few users not write.. ( which on production systems - should never happen anyways )
As an example, In Mysql-Multi-Master ( read_only is set by the scripts )
This in theory is only to simply decide which server is the "True Master" in the master-master configuration..
All in all.. Forget about read_only ( its really unneccesary, and probably wont protect you from what you imagine it will )
I think I see the problem
You have the following in your question:
Replicate_Do_DB: db1; db2
That is not supposed to be a semicolon-separated list. It is supposed to be a comma-separated list.
My guess is your have this in your slave's /etc/my.cnf
replicate-do-db=db1; db2
The correct way to set this up is
replicate-do-db=db1
replicate-do-db=db2
Please adjust this in the slave's /etc/my.cnf and restart mysql on the slave
Give it a Try !!!
UPDATE 2011-10-31 15:20 EDT
You may want to clear out the relay log by doing this
STOP SLAVE;
CHANGE MASTER TO master_log_file='mysql-bin.000008',master_log_pos-98;
START SLAVE;
then run SHOW SLAVE STATUS\G
and make sure replication is running by making sure you see this
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
just as you posted in your question
Best Answer
When you create a MySQL user
username@example.com
MySQL has to do a reverse lookup on every IP address connecting to it to determine whether they are part ofexample.com
.Of course, there's no restriction on creating reverse lookups, so I can quite happily ask my provider to set the reverse lookup for my IP address to be
google.com
if I want... orexample.com
if I happen to know that's what the users in your database have. This won't let me in, as MySQL then does a forward lookup on the returned domain to make sure it matches the same IP address that's connecting.You can switch this off with
skip_name_resolve
in yourmy.cnf
. There are many good reasons for doing this.The reason you are getting this error is that the IP address in question has no reverse lookup at all.
You also have malicious attackers from China trying to brute force their way into your database. That should be your top priority.