[iyunv@cjl ~]# mysql -uroot -p123123
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.5.22-log Source distribution
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>grant replication slave on *.* to 'myslave'@'99.99.99.%' identified by '123123';
Query OK, 0 rows affected (0.00 sec)
[iyunv@cjl ~]# mysql -uroot -p123123
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.5.22-log Source distribution
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> change master to master_host='99.99.99.22',master_user='myslave',master_password='123123',master_log_file='master-bin.000001',master_log_pos=336;
start slave;
show slave status\G;
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
[iyunv@cjl ~]# mysql -uroot -p123123
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.5.22-log Source distribution
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> change master to master_host='99.99.99.22',master_user='myslave',master_password='123123',master_log_file='master-bin.000001',master_log_pos=336;
start slave;
show slave status\G;
Slave_IO_Running: Yes
Slave_SQL_Running: Yes