mysql 主從設置

導出mysqldump --single-transaction --skip-opt --create-option -F --master-data=2 -q -B  -uroot game_release > game_rel0726.sqlmysql

數據庫game_release,用戶名密碼:game/!123456'sql

db上設置數據庫

grant replication slave,replication client on *.* to game@'114.238.171.12' identified by '!123456';ide


dr上設置 ip

create database game_release;it

grant all privileges on game_release.* to game@'114.238.171.12' identified by '!123456';io

mysql -uroot  game_release --default-character-set=latin1 < game_release0722.sqlast

grant all privileges on game_release.* to game@'114.238.171.12' identified by '!123456';class

FLUSH PRIVILEGES;cli

change master to master_host='114.238.171.12', master_user='game', master_password='!123456', master_log_file='mysql-bin.000039', master_log_pos=107;

FLUSH PRIVILEGES;

START SLAVE;

相關文章
相關標籤/搜索