You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

153 lines
5.7 KiB

20 years ago
20 years ago
20 years ago
20 years ago
20 years ago
20 years ago
  1. --------------------------------------------------------------------
  2. server_id = 1
  3. server_id = 2
  4. --------------------------------------------------------------------
  5. SHOW VARIABLES LIKE 'server_id';
  6. Variable_name Value
  7. server_id 1
  8. SHOW INSTANCES;
  9. instance_name state
  10. mysqld1 starting
  11. mysqld2 offline
  12. UNSET mysqld1.server_id;
  13. ERROR HY000: The instance is active. Stop the instance first
  14. SET mysqld1.server_id = 11;
  15. ERROR HY000: The instance is active. Stop the instance first
  16. CREATE INSTANCE mysqld3
  17. datadir = '/',
  18. server_id = 3,
  19. socket = "$MYSQL_TMP_DIR/mysqld_3.sock";
  20. START INSTANCE mysqld3;
  21. UNSET mysqld3.server_id;
  22. ERROR HY000: The instance is active. Stop the instance first
  23. SET mysqld3.server_id = 11;
  24. ERROR HY000: The instance is active. Stop the instance first
  25. STOP INSTANCE mysqld3;
  26. SHOW INSTANCE STATUS mysqld3;
  27. instance_name state version_number version mysqld_compatible
  28. mysqld3 offline VERSION_NUMBER VERSION no
  29. UNSET mysqld2.server_id;
  30. UNSET mysqld2.server_id;
  31. SHOW INSTANCE OPTIONS mysqld2;
  32. option_name value
  33. instance_name option_value
  34. socket option_value
  35. pid-file option_value
  36. port option_value
  37. datadir option_value
  38. log option_value
  39. log-error option_value
  40. log-slow-queries option_value
  41. language option_value
  42. character-sets-dir option_value
  43. basedir option_value
  44. skip-stack-trace option_value
  45. skip-innodb option_value
  46. skip-ndbcluster option_value
  47. nonguarded option_value
  48. log-output option_value
  49. SET mysqld2.server_id = 2;
  50. SET mysqld2.server_id = 2;
  51. SHOW INSTANCE OPTIONS mysqld2;
  52. option_name value
  53. instance_name option_value
  54. socket option_value
  55. pid-file option_value
  56. port option_value
  57. datadir option_value
  58. log option_value
  59. log-error option_value
  60. log-slow-queries option_value
  61. language option_value
  62. character-sets-dir option_value
  63. basedir option_value
  64. skip-stack-trace option_value
  65. skip-innodb option_value
  66. skip-ndbcluster option_value
  67. nonguarded option_value
  68. log-output option_value
  69. server_id option_value
  70. UNSET mysqld2.server_id = 11;
  71. ERROR 42000: You have an error in your command syntax. Check the manual that corresponds to your MySQL Instance Manager version for the right syntax to use
  72. SET mysqld2.aaa, mysqld3.bbb, mysqld2.ccc = 0010, mysqld3.ddd = 0020;
  73. --------------------------------------------------------------------
  74. aaa
  75. --------------------------------------------------------------------
  76. bbb
  77. --------------------------------------------------------------------
  78. ccc=0010
  79. --------------------------------------------------------------------
  80. ddd=0020
  81. --------------------------------------------------------------------
  82. UNSET mysqld2.aaa, mysqld3.bbb, mysqld2.ccc, mysqld3.ddd;
  83. --------------------------------------------------------------------
  84. --------------------------------------------------------------------
  85. --------------------------------------------------------------------
  86. --------------------------------------------------------------------
  87. --------------------------------------------------------------------
  88. SET mysqld2.aaa, mysqld3.bbb, mysqld.ccc = 0010;
  89. ERROR HY000: Bad instance name. Check that the instance with such a name exists
  90. --------------------------------------------------------------------
  91. --------------------------------------------------------------------
  92. --------------------------------------------------------------------
  93. --------------------------------------------------------------------
  94. SET mysqld2.aaa, mysqld3.bbb, mysqld1.ccc = 0010;
  95. ERROR HY000: The instance is active. Stop the instance first
  96. --------------------------------------------------------------------
  97. --------------------------------------------------------------------
  98. --------------------------------------------------------------------
  99. --------------------------------------------------------------------
  100. UNSET mysqld2.server_id, mysqld3.server_id, mysqld.ccc;
  101. ERROR HY000: Bad instance name. Check that the instance with such a name exists
  102. --------------------------------------------------------------------
  103. server_id = 1
  104. server_id=2
  105. server_id=3
  106. --------------------------------------------------------------------
  107. UNSET mysqld2.server_id, mysqld3.server_id, mysqld1.ccc;
  108. ERROR HY000: The instance is active. Stop the instance first
  109. --------------------------------------------------------------------
  110. server_id = 1
  111. server_id=2
  112. server_id=3
  113. --------------------------------------------------------------------
  114. DROP INSTANCE mysqld3;
  115. SET mysqld2.server_id=222;
  116. SET mysqld2.server_id = 222;
  117. SET mysqld2.server_id = 222 ;
  118. SET mysqld2 . server_id = 222 ;
  119. SET mysqld2 . server_id = 222 , mysqld2 . aaa , mysqld2 . bbb ;
  120. --------------------------------------------------------------------
  121. server_id = 1
  122. server_id=222
  123. --------------------------------------------------------------------
  124. aaa
  125. --------------------------------------------------------------------
  126. bbb
  127. --------------------------------------------------------------------
  128. UNSET mysqld2 . aaa , mysqld2 . bbb ;
  129. --------------------------------------------------------------------
  130. server_id = 1
  131. server_id=222
  132. --------------------------------------------------------------------
  133. --------------------------------------------------------------------
  134. --------------------------------------------------------------------
  135. --------------------------------------------------------------------
  136. server_id = 1
  137. server_id=222
  138. --------------------------------------------------------------------
  139. SHOW VARIABLES LIKE 'server_id';
  140. Variable_name Value
  141. server_id 1
  142. SHOW INSTANCES;
  143. instance_name state
  144. mysqld1 online
  145. mysqld2 offline
  146. FLUSH INSTANCES;
  147. ERROR HY000: At least one instance is active. Stop all instances first
  148. STOP INSTANCE mysqld1;
  149. SHOW INSTANCES;
  150. instance_name state
  151. mysqld1 offline
  152. mysqld2 offline
  153. FLUSH INSTANCES;