手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

MySQL 5.5配置主从复制

[日期:2012-06-05] 来源:Linux社区  作者:ylw6006 [字体:大 中 小]

四:在从库上指定主库的连接信息,并开启同步进程

  1. [root@dg54 ~]# MySQL  
  2. Welcome to the MySQL monitor.  Commands end with ; or \g.  
  3. Your MySQL connection id is 1  
  4. Server version: 5.5.25-log Source distribution  
  5.  
  6. Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.  
  7.  
  8. Oracle is a registered trademark of Oracle Corporation and/or its  
  9. affiliates. Other names may be trademarks of their respective  
  10. owners.  
  11.  
  12. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.  
  13.  
  14. mysql> change master to master_host='192.168.123.13',master_user='r_test',master_password='123456';  
  15. Query OK, 0 rows affected (0.07 sec)  
  16.  
  17. mysql> slave start;  
  18. Query OK, 0 rows affected, 1 warning (0.00 sec)  
  19.  
  20. mysql> show slave status \G;  
  21. *************************** 1. row ***************************  
  22.                Slave_IO_State: Waiting for master to send event  
  23.                   Master_Host: 192.168.123.13  
  24.                   Master_User: r_test  
  25.                   Master_Port: 3306  
  26.                 Connect_Retry: 60  
  27.               Master_Log_File: mysql-bin.000011  
  28.           Read_Master_Log_Pos: 107  
  29.                Relay_Log_File: dg54-relay-bin.000013  
  30.                 Relay_Log_Pos: 253  
  31.         Relay_Master_Log_File: mysql-bin.000011  
  32.              Slave_IO_Running: Yes  
  33.             Slave_SQL_Running: Yes  
  34.               Replicate_Do_DB: test,bbs  
  35.           Replicate_Ignore_DB:   
  36.            Replicate_Do_Table:   
  37.        Replicate_Ignore_Table:   
  38.       Replicate_Wild_Do_Table:   
  39.   Replicate_Wild_Ignore_Table:   
  40.                    Last_Errno: 0  
  41.                    Last_Error:   
  42.                  Skip_Counter: 0  
  43.           Exec_Master_Log_Pos: 107  
  44.               Relay_Log_Space: 554  
  45.               Until_Condition: None  
  46.                Until_Log_File:   
  47.                 Until_Log_Pos: 0  
  48.            Master_SSL_Allowed: No  
  49.            Master_SSL_CA_File:   
  50.            Master_SSL_CA_Path:   
  51.               Master_SSL_Cert:   
  52.             Master_SSL_Cipher:   
  53.                Master_SSL_Key:   
  54.         Seconds_Behind_Master: 0  
  55. Master_SSL_Verify_Server_Cert: No  
  56.                 Last_IO_Errno: 0  
  57.                 Last_IO_Error:   
  58.                Last_SQL_Errno: 0  
  59.                Last_SQL_Error:   
  60.   Replicate_Ignore_Server_Ids:   
  61.              Master_Server_Id: 1  
  62. 1 row in set (0.00 sec)  
  63.  
  64. ERROR:   
  65. No query specified 
linux
相关资讯       MySQL教程 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款