Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rmasse@web10:~$ sudo apt-get purge proxysql
- Reading package lists... Done
- Building dependency tree
- Reading state information... Done
- Package 'proxysql' is not installed, so not removed
- rmasse@web10:~$ sudo /opt/puppetlabs/bin/puppet agent --test
- Info: Using configured environment 'production'
- Info: Retrieving pluginfacts
- Info: Retrieving plugin
- Info: Loading facts
- Info: Caching catalog for web10.cloud.auxiliumgroup.com
- Info: Applying configuration version '1490015486'
- Notice: /Stage[main]/Proxysql::Install/Package[proxysql]/ensure: created
- Notice: /Stage[main]/Proxysql::Install/File[proxysql-datadir]/mode: mode changed '0755' to '0700'
- Info: Class[Proxysql::Install]: Scheduling refresh of Class[Proxysql::Service]
- Notice: /Stage[main]/Proxysql::Config/File[proxysql-config-file]/content:
- --- /etc/proxysql.cnf 2017-01-16 05:42:19.000000000 -0500
- +++ /tmp/puppet-file20170320-3355-380na9 2017-03-20 09:11:31.550647263 -0400
- @@ -1,177 +1,34 @@
- -#file proxysql.cfg
- +### MANAGED BY PUPPET ###
- -# This config file is parsed using libconfig , and its grammar is described in:
- -# http://www.hyperrealm.com/libconfig/libconfig_manual.html#Configuration-File-Grammar
- -# Grammar is also copied at the end of this file
- -
- -
- -
- -datadir="/var/lib/proxysql"
- -
- -admin_variables=
- -{
- - admin_credentials="admin:admin"
- - mysql_ifaces="127.0.0.1:6032;/tmp/proxysql_admin.sock"
- -# refresh_interval=2000
- -# debug=true
- + datadir = "/var/lib/proxysql"
- +admin_variables = {
- + admin_credentials = "admin:this_is_my_password"
- + mysql_ifaces = "127.0.0.1:6032;"
- }
- -mysql_variables=
- -{
- - threads=4
- - max_connections=2048
- - default_query_delay=0
- - default_query_timeout=36000000
- - have_compress=true
- - poll_timeout=2000
- - interfaces="0.0.0.0:6033;/tmp/proxysql.sock"
- - default_schema="information_schema"
- - stacksize=1048576
- - server_version="5.5.30"
- - connect_timeout_server=3000
- - monitor_history=600000
- - monitor_connect_interval=60000
- - monitor_ping_interval=10000
- - monitor_read_only_interval=1500
- - monitor_read_only_timeout=500
- - ping_interval_server=120000
- - ping_timeout_server=500
- - commands_stats=true
- - sessions_sort=true
- - connect_retries_on_failure=10
- +mysql_variables = {
- + interfaces = "0.0.0.0:3306;/tmp/proxysql.sock"
- + monitor_username = "monitoring"
- + monitor_password = "let me monitor"
- }
- +mysql_servers = (
- -# defines all the MySQL servers
- -mysql_servers =
- -(
- -# {
- -# address = "127.0.0.1" # no default, required . If port is 0 , address is interpred as a Unix Socket Domain
- -# port = 3306 # no default, required . If port is 0 , address is interpred as a Unix Socket Domain
- -# hostgroup = 0 # no default, required
- -# status = "ONLINE" # default: ONLINE
- -# weight = 1 # default: 1
- -# compression = 0 # default: 0
- -# max_replication_lag = 10 # default 0 . If greater than 0 and replication lag passes such threshold, the server is shunned
- -# },
- -# {
- -# address = "/var/lib/mysql/mysql.sock"
- -# port = 0
- -# hostgroup = 0
- -# },
- -# {
- -# address="127.0.0.1"
- -# port=21891
- -# hostgroup=0
- -# max_connections=200
- -# },
- -# { address="127.0.0.2" , port=3306 , hostgroup=0, max_connections=5 },
- -# { address="127.0.0.1" , port=21892 , hostgroup=1 },
- -# { address="127.0.0.1" , port=21893 , hostgroup=1 }
- -# { address="127.0.0.2" , port=3306 , hostgroup=1 },
- -# { address="127.0.0.3" , port=3306 , hostgroup=1 },
- -# { address="127.0.0.4" , port=3306 , hostgroup=1 },
- -# { address="/var/lib/mysql/mysql.sock" , port=0 , hostgroup=1 }
- )
- +mysql_users = (
- -# defines all the MySQL users
- -mysql_users:
- -(
- -# {
- -# username = "username" # no default , required
- -# password = "password" # default: ''
- -# default_hostgroup = 0 # default: 0
- -# active = 1 # default: 1
- -# },
- -# {
- -# username = "root"
- -# password = ""
- -# default_hostgroup = 0
- -# max_connections=1000
- -# default_schema="test"
- -# active = 1
- -# },
- -# { username = "user1" , password = "password" , default_hostgroup = 0 , active = 0 }
- )
- +mysql_query_rules = (
- -
- -#defines MySQL Query Rules
- -mysql_query_rules:
- -(
- -# {
- -# rule_id=1
- -# active=1
- -# match_pattern="^SELECT .* FOR UPDATE$"
- -# destination_hostgroup=0
- -# apply=1
- -# },
- -# {
- -# rule_id=2
- -# active=1
- -# match_pattern="^SELECT"
- -# destination_hostgroup=1
- -# apply=1
- -# }
- -)
- -
- -scheduler=
- -(
- -# {
- -# id=1
- -# active=0
- -# interval_ms=10000
- -# filename="/var/lib/proxysql/proxysql_galera_checker.sh"
- -# arg1="0"
- -# arg2="0"
- -# arg3="0"
- -# arg4="1"
- -# arg5="/var/lib/proxysql/proxysql_galera_checker.log"
- -# }
- )
- +scheduler = (
- -mysql_replication_hostgroups=
- -(
- -# {
- -# writer_hostgroup=30
- -# reader_hostgroup=40
- -# comment="test repl 1"
- -# },
- -# {
- -# writer_hostgroup=50
- -# reader_hostgroup=60
- -# comment="test repl 2"
- -# }
- )
- +mysql_replication_hostgroups = (
- +)
- -
- -# http://www.hyperrealm.com/libconfig/libconfig_manual.html#Configuration-File-Grammar
- -#
- -# Below is the BNF grammar for configuration files. Comments and include directives are not part of the grammar, so they are not included here.
- -#
- -# configuration = setting-list | empty
- -#
- -# setting-list = setting | setting-list setting
- -#
- -# setting = name (":" | "=") value (";" | "," | empty)
- -#
- -# value = scalar-value | array | list | group
- -#
- -# value-list = value | value-list "," value
- -#
- -# scalar-value = boolean | integer | integer64 | hex | hex64 | float
- -# | string
- -#
- -# scalar-value-list = scalar-value | scalar-value-list "," scalar-value
- -#
- -# array = "[" (scalar-value-list | empty) "]"
- -#
- -# list = "(" (value-list | empty) ")"
- -#
- -# group = "{" (setting-list | empty) "}"
- -#
- -# empty =
- Info: Computing checksum on file /etc/proxysql.cnf
- Info: FileBucket got a duplicate file {md5}f13b6a0150bcb43c321fe5ca0b60bb4b
- Info: /Stage[main]/Proxysql::Config/File[proxysql-config-file]: Filebucketed /etc/proxysql.cnf to puppet with sum f13b6a0150bcb43c321fe5ca0b60bb4b
- Notice: /Stage[main]/Proxysql::Config/File[proxysql-config-file]/content:
- Notice: /Stage[main]/Proxysql::Config/File[proxysql-config-file]/content: content changed '{md5}f13b6a0150bcb43c321fe5ca0b60bb4b' to '{md5}8da7b3c4cf01ee37ac0a3dade76c167f'
- Notice: /Stage[main]/Proxysql::Config/File[proxysql-config-file]/group: group changed 'proxysql' to 'root'
- Notice: /Stage[main]/Proxysql::Config/File[root-mycnf-file]/content:
- --- /root/.my.cnf 2017-03-19 21:39:26.997563223 -0400
- +++ /tmp/puppet-file20170320-3355-5uf05g 2017-03-20 09:11:31.618651098 -0400
- @@ -6,4 +6,4 @@
- host = 127.0.0.1
- port = 6032
- user = admin
- -password = admin
- +password = this_is_my_password
- Info: Computing checksum on file /root/.my.cnf
- Info: FileBucket got a duplicate file {md5}1d04b659ff83b9e6b7bc70af9a788bd1
- Info: /Stage[main]/Proxysql::Config/File[root-mycnf-file]: Filebucketed /root/.my.cnf to puppet with sum 1d04b659ff83b9e6b7bc70af9a788bd1
- Notice: /Stage[main]/Proxysql::Config/File[root-mycnf-file]/content: content changed '{md5}1d04b659ff83b9e6b7bc70af9a788bd1' to '{md5}3bb581033a1298c6de5b401193767de6'
- Info: Class[Proxysql::Service]: Scheduling refresh of Service[proxysql]
- Info: Class[Proxysql::Service]: Scheduling refresh of Exec[wait_for_admin_socket_to_open]
- Notice: /Stage[main]/Proxysql::Service/Service[proxysql]/ensure: ensure changed 'stopped' to 'running'
- Info: /Stage[main]/Proxysql::Service/Service[proxysql]: Unscheduling refresh on Service[proxysql]
- Notice: /Stage[main]/Proxysql::Service/Exec[wait_for_admin_socket_to_open]: Triggered 'refresh' from 1 events
- 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)
- rmasse@web10:~$ mysql -u admin -padmin -P 6032 -h 127.0.0.1
- mysql: [Warning] Using a password on the command line interface can be insecure.
- Welcome to the MySQL monitor. Commands end with ; or \g.
- Your MySQL connection id is 1
- Server version: 5.5.30 (ProxySQL Admin Module)
- Copyright (c) 2000, 2016, 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> exit
- Bye
- rmasse@web10:~$
- rmasse@web10:~$ mysql -u admin -pthis_is_my_password -P 6032 -h 127.0.0.1
- mysql: [Warning] Using a password on the command line interface can be insecure.
- ERROR 1045 (28000): ProxySQL Error: Access denied for user 'admin'@'' (using password: YES)
- rmasse@web10:~$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement