设置A:
在A的mysql中设置了用户:
grant file on *.* to backup@\'16.10.25.14\' identified by \'1234\';
并且建立了待备份的库b
修改A机的my.cnf:
log-bin
server-id = 1
sql-bin-update-same
binlog-do-db=b
检查B的mysql\\var目录,发现.err文件中报错:
041207 23:13:59 While trying to obtain the list of slaves from the master \'16.10.25.14:8888\', user \'backup\' got the following error: \'Access denied. You need the REPLICATION SLAVE privilege for this operation\'
按照提示,在A的mysql中,将REPLICATION SLAVE赋给用户backup
还是不能更新。err文件内容:
041208 2:29:15 Slave SQL thread initialized, starting replication in log \'p-bin.016\' at position 287, relay log \'./a-relay-bin.011\' position: 4
/home/magicj/mysql/libexec/mysqld: ready for connections.
Version: \'4.0.22-log\' socket: \'/home/magicj/tmp/mysql.sock\' port: 8888 Source distribution
041208 2:29:15 Slave I/O thread: connected to master \'backup@16.10.25.14:8888\', replication started in log \'FIRST\' at position 4