mysql主从复制
[root@db02 data]# mysql -S /data/3306/mysql.sock 查看变量: mysql> show variables like 'log_bin%'; +---------------------------------+----------------------------+ | Variable_name | Value | +---------------------------------+----------------------------+ | log_bin | ON | | log_bin_basename | /data/3306/mysql-bin | | log_bin_index | /data/3306/mysql-bin.index | | log_bin_trust_function_creators | OFF | | log_bin_use_v1_row_events | OFF | +---------------------------------+----------------------------+ 5 rows in set (0.00 sec) 2、建账号授权【主库】 grant replication slave on *.* to 'rep'@'172.16.1.%'