List:General Discussion« Previous MessageNext Message »
From:Nico Sabbi Date:March 10 2006 1:44pm
Subject:Replication of GRANTs
View as plain text  
Hi,
I don't understand how GRANTS are replicated in Mysql 4.0.26 (I can't 
upgrade to a newer version).
The servers were all cleanly installed from scratch (not upgraded) using 
Mysql's 4.0.26 official rpm.
According to the manual GRANT statements should be replicated  and after 
executing
'flush privileges' on the slave I should see  the new access rights in 
effect, yet:

on the master:
mysql> show grants for d6882@'%';
+------------------------------------------------------------------------------+ 

| Grants for 
d6882@%                                                           |
+------------------------------------------------------------------------------+ 

| GRANT USAGE ON *.* TO 'd6882'@'%' IDENTIFIED BY PASSWORD 
'077c47e54922b29b'  |
| GRANT SELECT, INSERT, UPDATE, DELETE ON `sessions`.`sessions` TO 
'd6882'@'%' |
+------------------------------------------------------------------------------+ 

2 rows in set (0.10 sec)



on the slave:

mysql> show grants for d6882@'%';
ERROR 1141: GRANT non definita per l'utente 'd6882' dalla macchina '%'
flush privileges;
Query OK, 0 rows affected (19 min 54.15 sec)            ## <--------------- THIS IS NOT
NORMAL

mysql> show grants for d6882@'%';
ERROR 1141: GRANT non definita per l'utente 'd6882' dalla macchina '%'

Sane thing after having flushed privileges on the master.

mysql> show slave status \G
*************************** 1. row ***************************
         Master_Host: 192.168.65.11
         Master_Port: 3306
       Connect_retry: 60
     Master_Log_File: nodo2-bin.004
 Read_Master_Log_Pos: 189127893
      Relay_Log_File: sviluppo-relay-bin.004
       Relay_Log_Pos: 189127973
Relay_Master_Log_File: nodo2-bin.004
    Slave_IO_Running: Yes
   Slave_SQL_Running: Yes
     Replicate_do_db:
 Replicate_ignore_db:
          Last_errno: 0
          Last_error:
        Skip_counter: 0
 Exec_master_log_pos: 189127893
     Relay_log_space: 189127973
1 row in set (0.01 sec)


On the slave these are the replication settings:

server-id=150
master-host=192.168.65.11
master-connect-retry=60
replicate-wild-do-table=%.%
replicate-wild-ignore-table=sessions.sessions


BTW, the statements in tables sessions.sessions  seem to be replicated: 
I can see them
with show processlist. why?
delete from sessions.sessions;
Query OK, 99458 rows affected (0.16 sec)

mysql> select count(*) from sessions.sessions;
+----------+
| count(*) |
+----------+
|       38 |
+----------+
1 row in set (0.00 sec)

mysql> select count(*) from sessions.sessions;
+----------+
| count(*) |
+----------+
|       39 |
+----------+
1 row in set (0.00 sec)



Thanks,

   Nico



 
 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 Biglietti da visita premium GRATUITI. Offerta in scadenza┬ů
* 
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=4834&d=10-3
Thread
Replication of GRANTsNico Sabbi10 Mar