Hi,
I'm running mysql-max 4.0.18 on two servers on separate networks, master is A 
and slave is B.

The problem is that if I don't grant on the master the full range of 
privileges to the slave the replication doesn't even start.
Even worse is the fact that grants seems to be totally managed at random, 
as you can see:

(A and B obviously are fake names).
mysql A> GRANT REPLICATION SLAVE, REPLICATION CLIENT, SUPER, RELOAD on  *.* TO 
'replica'@'B' IDENTIFIED BY PASSWORD '715a443962d324cc';

OK

mysql A> show grants for replica@'B';
+----------------------------------------------------------------------------------------------------------------+
| Grants for [EMAIL PROTECTED]                                                         
                    
|
+----------------------------------------------------------------------------------------------------------------+
| GRANT RELOAD ON *.* TO 'replica'@'B' IDENTIFIED BY PASSWORD 
'715a443962d324cc' WITH GRANT OPTION |
+----------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

- I didn't grant (yet) any option, so why does it say 'WITH GRANT OPTION' ?
- where have all the other privileges gone? they vanished

mysql A> revoke ALL PRIVILEGES on *.* from replica@'B'; # identified by 
'RC_rpl!';
Query OK, 0 rows affected (0.00 sec)

mysql A> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql A> show grants for replica@'B';
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Grants for [EMAIL PROTECTED]                                                         
                                                                  
|
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
| GRANT SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES ON *.* TO 
'replica'@'B' IDENTIFIED BY PASSWORD '715a443962d324cc' WITH GRANT OPTION |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

where did it take these rights from? I revoked them all



Now the replication part:

mysql A> GRANT super, reload, replication client, replication slave ON *.* TO 
'replica'@'B' IDENTIFIED BY PASSWORD '715a443962d324cc' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)

mysql A> flush privileges;
Query OK, 0 rows affected (0.00 sec)

these are the logs on B:
040430 11:10:34  InnoDB: Started
/usr/sbin/mysqld-max: ready for connections.
Version: '4.0.18-Max-log'  socket: '/var/lib/mysql/mysql.sock'  port: 3306
040430 11:10:34  Slave I/O thread: connected to master '[EMAIL PROTECTED]:3306',  
replication started in log 'db-bin.3321' at position 34997604
040430 11:10:34  While trying to obtain the list of slaves from the master 
'A:3306', user 'replica' got the following error: 'Access denied. You need 
the REPLICATION SLAVE privilege for this operation'
040430 11:10:34  Slave I/O thread exiting, read up to log 'db-bin.3321', 
position 34997604


What is going wrong?

P.S. the manual doesn't say that grants super, reload, replication client and 
replication slave can be used only on *.* and not on DB.*.

Thanks,
                Nico

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to