Advertisement
Guest User

Untitled

a guest
Mar 20th, 2017
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.82 KB | None | 0 0
  1. rmasse@web10:~$ sudo apt-get purge proxysql
  2. Reading package lists... Done
  3. Building dependency tree
  4. Reading state information... Done
  5. Package 'proxysql' is not installed, so not removed
  6.  
  7. rmasse@web10:~$ sudo /opt/puppetlabs/bin/puppet agent --test
  8. Info: Using configured environment 'production'
  9. Info: Retrieving pluginfacts
  10. Info: Retrieving plugin
  11. Info: Loading facts
  12. Info: Caching catalog for web10.cloud.auxiliumgroup.com
  13. Info: Applying configuration version '1490015486'
  14. Notice: /Stage[main]/Proxysql::Install/Package[proxysql]/ensure: created
  15. Notice: /Stage[main]/Proxysql::Install/File[proxysql-datadir]/mode: mode changed '0755' to '0700'
  16. Info: Class[Proxysql::Install]: Scheduling refresh of Class[Proxysql::Service]
  17. Notice: /Stage[main]/Proxysql::Config/File[proxysql-config-file]/content:
  18. --- /etc/proxysql.cnf 2017-01-16 05:42:19.000000000 -0500
  19. +++ /tmp/puppet-file20170320-3355-380na9 2017-03-20 09:11:31.550647263 -0400
  20. @@ -1,177 +1,34 @@
  21. -#file proxysql.cfg
  22. +### MANAGED BY PUPPET ###
  23.  
  24. -# This config file is parsed using libconfig , and its grammar is described in:
  25. -# http://www.hyperrealm.com/libconfig/libconfig_manual.html#Configuration-File-Grammar
  26. -# Grammar is also copied at the end of this file
  27. -
  28. -
  29. -
  30. -datadir="/var/lib/proxysql"
  31. -
  32. -admin_variables=
  33. -{
  34. - admin_credentials="admin:admin"
  35. - mysql_ifaces="127.0.0.1:6032;/tmp/proxysql_admin.sock"
  36. -# refresh_interval=2000
  37. -# debug=true
  38. + datadir = "/var/lib/proxysql"
  39. +admin_variables = {
  40. + admin_credentials = "admin:this_is_my_password"
  41. + mysql_ifaces = "127.0.0.1:6032;"
  42. }
  43.  
  44. -mysql_variables=
  45. -{
  46. - threads=4
  47. - max_connections=2048
  48. - default_query_delay=0
  49. - default_query_timeout=36000000
  50. - have_compress=true
  51. - poll_timeout=2000
  52. - interfaces="0.0.0.0:6033;/tmp/proxysql.sock"
  53. - default_schema="information_schema"
  54. - stacksize=1048576
  55. - server_version="5.5.30"
  56. - connect_timeout_server=3000
  57. - monitor_history=600000
  58. - monitor_connect_interval=60000
  59. - monitor_ping_interval=10000
  60. - monitor_read_only_interval=1500
  61. - monitor_read_only_timeout=500
  62. - ping_interval_server=120000
  63. - ping_timeout_server=500
  64. - commands_stats=true
  65. - sessions_sort=true
  66. - connect_retries_on_failure=10
  67. +mysql_variables = {
  68. + interfaces = "0.0.0.0:3306;/tmp/proxysql.sock"
  69. + monitor_username = "monitoring"
  70. + monitor_password = "let me monitor"
  71. }
  72.  
  73. +mysql_servers = (
  74.  
  75. -# defines all the MySQL servers
  76. -mysql_servers =
  77. -(
  78. -# {
  79. -# address = "127.0.0.1" # no default, required . If port is 0 , address is interpred as a Unix Socket Domain
  80. -# port = 3306 # no default, required . If port is 0 , address is interpred as a Unix Socket Domain
  81. -# hostgroup = 0 # no default, required
  82. -# status = "ONLINE" # default: ONLINE
  83. -# weight = 1 # default: 1
  84. -# compression = 0 # default: 0
  85. -# max_replication_lag = 10 # default 0 . If greater than 0 and replication lag passes such threshold, the server is shunned
  86. -# },
  87. -# {
  88. -# address = "/var/lib/mysql/mysql.sock"
  89. -# port = 0
  90. -# hostgroup = 0
  91. -# },
  92. -# {
  93. -# address="127.0.0.1"
  94. -# port=21891
  95. -# hostgroup=0
  96. -# max_connections=200
  97. -# },
  98. -# { address="127.0.0.2" , port=3306 , hostgroup=0, max_connections=5 },
  99. -# { address="127.0.0.1" , port=21892 , hostgroup=1 },
  100. -# { address="127.0.0.1" , port=21893 , hostgroup=1 }
  101. -# { address="127.0.0.2" , port=3306 , hostgroup=1 },
  102. -# { address="127.0.0.3" , port=3306 , hostgroup=1 },
  103. -# { address="127.0.0.4" , port=3306 , hostgroup=1 },
  104. -# { address="/var/lib/mysql/mysql.sock" , port=0 , hostgroup=1 }
  105. )
  106.  
  107. +mysql_users = (
  108.  
  109. -# defines all the MySQL users
  110. -mysql_users:
  111. -(
  112. -# {
  113. -# username = "username" # no default , required
  114. -# password = "password" # default: ''
  115. -# default_hostgroup = 0 # default: 0
  116. -# active = 1 # default: 1
  117. -# },
  118. -# {
  119. -# username = "root"
  120. -# password = ""
  121. -# default_hostgroup = 0
  122. -# max_connections=1000
  123. -# default_schema="test"
  124. -# active = 1
  125. -# },
  126. -# { username = "user1" , password = "password" , default_hostgroup = 0 , active = 0 }
  127. )
  128.  
  129. +mysql_query_rules = (
  130.  
  131. -
  132. -#defines MySQL Query Rules
  133. -mysql_query_rules:
  134. -(
  135. -# {
  136. -# rule_id=1
  137. -# active=1
  138. -# match_pattern="^SELECT .* FOR UPDATE$"
  139. -# destination_hostgroup=0
  140. -# apply=1
  141. -# },
  142. -# {
  143. -# rule_id=2
  144. -# active=1
  145. -# match_pattern="^SELECT"
  146. -# destination_hostgroup=1
  147. -# apply=1
  148. -# }
  149. -)
  150. -
  151. -scheduler=
  152. -(
  153. -# {
  154. -# id=1
  155. -# active=0
  156. -# interval_ms=10000
  157. -# filename="/var/lib/proxysql/proxysql_galera_checker.sh"
  158. -# arg1="0"
  159. -# arg2="0"
  160. -# arg3="0"
  161. -# arg4="1"
  162. -# arg5="/var/lib/proxysql/proxysql_galera_checker.log"
  163. -# }
  164. )
  165.  
  166. +scheduler = (
  167.  
  168. -mysql_replication_hostgroups=
  169. -(
  170. -# {
  171. -# writer_hostgroup=30
  172. -# reader_hostgroup=40
  173. -# comment="test repl 1"
  174. -# },
  175. -# {
  176. -# writer_hostgroup=50
  177. -# reader_hostgroup=60
  178. -# comment="test repl 2"
  179. -# }
  180. )
  181.  
  182. +mysql_replication_hostgroups = (
  183.  
  184. +)
  185.  
  186. -
  187. -# http://www.hyperrealm.com/libconfig/libconfig_manual.html#Configuration-File-Grammar
  188. -#
  189. -# Below is the BNF grammar for configuration files. Comments and include directives are not part of the grammar, so they are not included here.
  190. -#
  191. -# configuration = setting-list | empty
  192. -#
  193. -# setting-list = setting | setting-list setting
  194. -#
  195. -# setting = name (":" | "=") value (";" | "," | empty)
  196. -#
  197. -# value = scalar-value | array | list | group
  198. -#
  199. -# value-list = value | value-list "," value
  200. -#
  201. -# scalar-value = boolean | integer | integer64 | hex | hex64 | float
  202. -# | string
  203. -#
  204. -# scalar-value-list = scalar-value | scalar-value-list "," scalar-value
  205. -#
  206. -# array = "[" (scalar-value-list | empty) "]"
  207. -#
  208. -# list = "(" (value-list | empty) ")"
  209. -#
  210. -# group = "{" (setting-list | empty) "}"
  211. -#
  212. -# empty =
  213.  
  214. Info: Computing checksum on file /etc/proxysql.cnf
  215. Info: FileBucket got a duplicate file {md5}f13b6a0150bcb43c321fe5ca0b60bb4b
  216. Info: /Stage[main]/Proxysql::Config/File[proxysql-config-file]: Filebucketed /etc/proxysql.cnf to puppet with sum f13b6a0150bcb43c321fe5ca0b60bb4b
  217. Notice: /Stage[main]/Proxysql::Config/File[proxysql-config-file]/content:
  218.  
  219. Notice: /Stage[main]/Proxysql::Config/File[proxysql-config-file]/content: content changed '{md5}f13b6a0150bcb43c321fe5ca0b60bb4b' to '{md5}8da7b3c4cf01ee37ac0a3dade76c167f'
  220. Notice: /Stage[main]/Proxysql::Config/File[proxysql-config-file]/group: group changed 'proxysql' to 'root'
  221. Notice: /Stage[main]/Proxysql::Config/File[root-mycnf-file]/content:
  222. --- /root/.my.cnf 2017-03-19 21:39:26.997563223 -0400
  223. +++ /tmp/puppet-file20170320-3355-5uf05g 2017-03-20 09:11:31.618651098 -0400
  224. @@ -6,4 +6,4 @@
  225. host = 127.0.0.1
  226. port = 6032
  227. user = admin
  228. -password = admin
  229. +password = this_is_my_password
  230.  
  231. Info: Computing checksum on file /root/.my.cnf
  232. Info: FileBucket got a duplicate file {md5}1d04b659ff83b9e6b7bc70af9a788bd1
  233. Info: /Stage[main]/Proxysql::Config/File[root-mycnf-file]: Filebucketed /root/.my.cnf to puppet with sum 1d04b659ff83b9e6b7bc70af9a788bd1
  234. Notice: /Stage[main]/Proxysql::Config/File[root-mycnf-file]/content: content changed '{md5}1d04b659ff83b9e6b7bc70af9a788bd1' to '{md5}3bb581033a1298c6de5b401193767de6'
  235. Info: Class[Proxysql::Service]: Scheduling refresh of Service[proxysql]
  236. Info: Class[Proxysql::Service]: Scheduling refresh of Exec[wait_for_admin_socket_to_open]
  237. Notice: /Stage[main]/Proxysql::Service/Service[proxysql]/ensure: ensure changed 'stopped' to 'running'
  238. Info: /Stage[main]/Proxysql::Service/Service[proxysql]: Unscheduling refresh on Service[proxysql]
  239. Notice: /Stage[main]/Proxysql::Service/Exec[wait_for_admin_socket_to_open]: Triggered 'refresh' from 1 events
  240. Error: Failed to apply catalog: Execution of '/usr/bin/mysql --defaults-extra-file=/root/.my.cnf -NBe SELECT `hostname`, `port`, `hostgroup_id` FROM `mysql_servers`' returned 1: ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)
  241. rmasse@web10:~$ mysql -u admin -padmin -P 6032 -h 127.0.0.1
  242. mysql: [Warning] Using a password on the command line interface can be insecure.
  243. Welcome to the MySQL monitor. Commands end with ; or \g.
  244. Your MySQL connection id is 1
  245. Server version: 5.5.30 (ProxySQL Admin Module)
  246.  
  247. Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
  248.  
  249. Oracle is a registered trademark of Oracle Corporation and/or its
  250. affiliates. Other names may be trademarks of their respective
  251. owners.
  252.  
  253. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  254.  
  255. mysql> exit
  256. Bye
  257. rmasse@web10:~$
  258.  
  259. rmasse@web10:~$ mysql -u admin -pthis_is_my_password -P 6032 -h 127.0.0.1
  260. mysql: [Warning] Using a password on the command line interface can be insecure.
  261. ERROR 1045 (28000): ProxySQL Error: Access denied for user 'admin'@'' (using password: YES)
  262. rmasse@web10:~$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement