Advertisement
Guest User

Untitled

a guest
May 26th, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.81 KB | None | 0 0
  1. mysql> show slave statusG
  2. *************************** 1. row ***************************
  3. Slave_IO_State: Connecting to master
  4. Master_Host: <my.host.ip>
  5. Master_User: slave_user
  6. Master_Port: 3306
  7. Connect_Retry: 60
  8. Master_Log_File: mysql-bin.000001
  9. Read_Master_Log_Pos: 107
  10. Relay_Log_File: mysqld-relay-bin.000003
  11. Relay_Log_Pos: 4
  12. Relay_Master_Log_File: mysql-bin.000001
  13. Slave_IO_Running: Connecting
  14. Slave_SQL_Running: Yes
  15. Replicate_Do_DB: my_db_name
  16. Replicate_Ignore_DB:
  17. Replicate_Do_Table:
  18. Replicate_Ignore_Table:
  19. Replicate_Wild_Do_Table:
  20. Replicate_Wild_Ignore_Table:
  21. Last_Errno: 0
  22. Last_Error:
  23. Skip_Counter: 0
  24. Exec_Master_Log_Pos: 107
  25. Relay_Log_Space: 107
  26. Until_Condition: None
  27. Until_Log_File:
  28. Until_Log_Pos: 0
  29. Master_SSL_Allowed: No
  30. Master_SSL_CA_File:
  31. Master_SSL_CA_Path:
  32. Master_SSL_Cert:
  33. Master_SSL_Cipher:
  34. Master_SSL_Key:
  35. Seconds_Behind_Master: NULL
  36. Master_SSL_Verify_Server_Cert: No
  37. Last_IO_Errno: 1045
  38. Last_IO_Error: error connecting to master 'slave_user@my.host.ip:3306' - retry-time: 60 retries: 86400
  39. Last_SQL_Errno: 0
  40. Last_SQL_Error:
  41. Replicate_Ignore_Server_Ids:
  42. Master_Server_Id: 0
  43. 1 row in set (0.00 sec)
  44.  
  45. mysql>
  46.  
  47. $ mysql -h mistletoe.jellybooks.com -u slave_user -p
  48. Enter password:
  49. Welcome to the MySQL monitor. Commands end with ; or g.
  50. Your MySQL connection id is 46
  51. Server version: 5.5.49-0ubuntu0.14.04.1-log (Ubuntu)
  52.  
  53. Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
  54.  
  55. Oracle is a registered trademark of Oracle Corporation and/or its
  56. affiliates. Other names may be trademarks of their respective
  57. owners.
  58.  
  59. Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
  60.  
  61. mysql> show databases;
  62. +--------------------+
  63. | Database |
  64. +--------------------+
  65. | information_schema |
  66. +--------------------+
  67. 1 row in set (0.00 sec)
  68.  
  69. mysql> use my_db_name;
  70. ERROR 1044 (42000): Access denied for user 'slave_user'@'%.my-domain.com' to database 'my_db_name'
  71. mysql>
  72.  
  73. CREATE USER 'slave_user'@'%.my-domain.com'
  74. IDENTIFIED BY 'changeme';
  75.  
  76. GRANT REPLICATION SLAVE ON *.* TO 'slave_user'@'%.my-domain.com';
  77.  
  78. mysql> select * from mysql.user where user = 'slave_user'G
  79. *************************** 1. row ***************************
  80. Host: %.my-domain.com
  81. User: slave_user
  82. Password: *la-de-da-da-nothing-to-see-here-hashed
  83. Select_priv: N
  84. Insert_priv: N
  85. Update_priv: N
  86. Delete_priv: N
  87. Create_priv: N
  88. Drop_priv: N
  89. Reload_priv: N
  90. Shutdown_priv: N
  91. Process_priv: N
  92. File_priv: N
  93. Grant_priv: N
  94. References_priv: N
  95. Index_priv: N
  96. Alter_priv: N
  97. Show_db_priv: N
  98. Super_priv: N
  99. Create_tmp_table_priv: N
  100. Lock_tables_priv: N
  101. Execute_priv: N
  102. Repl_slave_priv: Y
  103. Repl_client_priv: N
  104. Create_view_priv: N
  105. Show_view_priv: N
  106. Create_routine_priv: N
  107. Alter_routine_priv: N
  108. Create_user_priv: N
  109. Event_priv: N
  110. Trigger_priv: N
  111. Create_tablespace_priv: N
  112. ssl_type:
  113. ssl_cipher:
  114. x509_issuer:
  115. x509_subject:
  116. max_questions: 0
  117. max_updates: 0
  118. max_connections: 0
  119. max_user_connections: 0
  120. plugin:
  121. authentication_string: NULL
  122. 1 row in set (0.00 sec)
  123.  
  124. mysql>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement