root@localhost [(none)]>grant replication slave on *.* to 'wyz'@'%' identified by 'zstzst';
Query OK, 0 rows affected, 1 warning (0.00 sec)
root@localhost [(none)]>show grants for 'wyz'@'%';
+---------------------------------------------+
| Grants for wyz@% |
+---------------------------------------------+
| GRANT REPLICATION SLAVE ON *.* TO 'wyz'@'%' |
+---------------------------------------------+
1 row in set (0.00 sec)
#mysqlbinlog --host=192.168.99.210 --password='zstzst' --user='wyz' --port=3506 --read-from-remote-server mysql-bin.000001 --raw --stop-never &
[root@db5_12:00:08 /data/backup] 坚持下去,困境在前方,希望在拐角。
#ll
total 38247684
-rw-r-----. 1 root root 190918136 Aug 2 11:47 mysql-bin.000001
-rw-r-----. 1 root root 217 Aug 2 11:47 mysql-bin.000002
-rw-r-----. 1 root root 268440371 Aug 2 11:47 mysql-bin.000003
-rw-r-----. 1 root root 268435699 Aug 2 11:47 mysql-bin.000004
-rw-r-----. 1 root root 268443336 Aug 2 11:47 mysql-bin.000005
-rw-r-----. 1 root root 268442482 Aug 2 11:47 mysql-bin.000006
-rw-r-----. 1 root root 268445370 Aug 2 11:47 mysql-bin.000007
-rw-r-----. 1 root root 268438115 Aug 2 11:47 mysql-bin.000008
-rw-r-----. 1 root root 268444494 Aug 2 11:48 mysql-bin.000009
-rw-r-----. 1 root root 268435555 Aug 2 11:48 mysql-bin.000010
-rw-r-----. 1 root root 268442595 Aug 2 11:48 mysql-bin.000011
-rw-r-----. 1 root root 268442419 Aug 2 11:48 mysql-bin.000012
-rw-r-----. 1 root root 268437857 Aug 2 11:48 mysql-bin.000013
-rw-r-----. 1 root root 268438414 Aug 2 11:48 mysql-bin.000014
-rw-r-----. 1 root root 268437131 Aug 2 11:48 mysql-bin.000015
...
root@localhost [(none)]>show processlist;
+----+------+-----------+------+-------------+------+-------------------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+------+-----------+------+-------------+------+-------------------+------------------+
| 56 | wyz | db5:45028 | NULL | Binlog Dump | 893 | Sending to client | NULL |
| 57 | root | localhost | NULL | Query | 0 | starting | show processlist |
+----+------+-----------+------+-------------+------+-------------------+------------------+
2 rows in set (0.00 sec)
root@localhost [(none)]>