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;

相关文章
相关标签/搜索