Details

    • Bug
    • Status: Done
    • Medium
    • Resolution: Fixed
    • None
    • 2.0.14
    • None
    • None

    Description

      If you specify password for proxyadmin just as '%' symbol, it will cause that proxysql-admin tool can't connect to the proxysql, but it's able to connect with mysql command without any problems

      Debug output of proxysql-admin --debug

      debug (line:2771) : Loading /etc/proxysql-admin.cnf 
      debug: ProxySQL datadir: /var/lib/proxysql
      debug (line:712) : exec_sql : proxyadmin@localhost:6032 ==> SELECT 1 
      ERROR 1045 (28000): ProxySQL Error: Access denied for user 'proxyadmin'@'127.0.0.1' (using password: YES) 
      debug: --> query failed 1 ERROR (line:713) : ProxySQL connection check failed. 
      -- Could not connect to ProxySQL at localhost:6032 
      -- Please check the ProxySQL connection parameters and status.
      

       

      To connect to mysql i'm using this command

       

      mysql -uproxyadmin -p% -h127.0.0.1 -P6032
      

       

       

      proxysql-admin.cnf

      export PROXYSQL_DATADIR='/var/lib/proxysql' 
      export PROXYSQL_USERNAME='proxyadmin' 
      export PROXYSQL_PASSWORD='%' 
      export PROXYSQL_HOSTNAME='localhost' 
      export PROXYSQL_PORT='6032'
      # PXC admin credentials for connecting to pxc-cluster-node. 
      export CLUSTER_USERNAME='operator' 
      export CLUSTER_PASSWORD='operator' 
      export CLUSTER_PORT='3306'
      # proxysql monitoring user. proxysql admin script will create this user in pxc to monitor pxc-nodes. 
      export MONITOR_USERNAME='monitor' 
      export MONITOR_PASSWORD='monitor' 
      export USE_EXISTING_MONITOR_PASSWORD=1
      # Application user to connect to pxc-node through proxysql 
      export WITH_CLUSTER_APP_USER=0
      # ProxySQL hostgroup IDs 
      export READER_HOSTGROUP_ID='10' 
      export WRITER_HOSTGROUP_ID='11' 
      export BACKUP_WRITER_HOSTGROUP_ID='12' 
      export OFFLINE_HOSTGROUP_ID='13'
      # ProxySQL read/write configuration mode. export MODE="singlewrite" 
      export WRITE_NODE=""
      # max_connections default (used only when INSERTing a new mysql_servers entry) 
      export MAX_CONNECTIONS="1000"
      # Determines the maximum number of writesets a node can have queued 
      # before the node is SHUNNED to avoid stale reads. 
      export MAX_TRANSACTIONS_BEHIND=100
      

       

      proxysql.cnf

       

      datadir="/var/lib/proxysql"
      admin_variables =
      {
       admin_credentials="proxyadmin:%"
       mysql_ifaces="0.0.0.0:6032"
       refresh_interval=2000
       cluster_username="proxyadmin"
       cluster_password="%"
       cluster_check_interval_ms=200
       cluster_check_status_frequency=100
       cluster_mysql_query_rules_save_to_disk=true
       cluster_mysql_servers_save_to_disk=true
       cluster_mysql_users_save_to_disk=true
       cluster_proxysql_servers_save_to_disk=true
       cluster_mysql_query_rules_diffs_before_sync=1
       cluster_mysql_servers_diffs_before_sync=1
       cluster_mysql_users_diffs_before_sync=1
       cluster_proxysql_servers_diffs_before_sync=1
      }
       
      mysql_variables=
      {
       monitor_password="monitor"
       monitor_galera_healthcheck_interval=1000
       threads=2
       max_connections=2048
       default_query_delay=0
       default_query_timeout=10000
       poll_timeout=2000
       interfaces="0.0.0.0:3306"
       default_schema="information_schema"
       stacksize=1048576
       connect_timeout_server=10000
       monitor_history=60000
       monitor_connect_interval=20000
       monitor_ping_interval=10000
       ping_timeout_server=200
       commands_stats=true
       sessions_sort=true
       have_ssl=true
       ssl_p2s_ca="/etc/proxysql/ssl-internal/ca.crt"
       ssl_p2s_cert="/etc/proxysql/ssl-internal/tls.crt"
       ssl_p2s_key="/etc/proxysql/ssl-internal/tls.key"
       ssl_p2s_cipher="ECDHE-RSA-AES128-GCM-SHA256"
      }
      

      P.S As i figured out, any combination of password which contains '%' symbol will cause auth errors

      P.S2. Looks like issue is caused by this line
      https://github.com/percona/proxysql-admin-tool/blob/v2.0/proxysql-admin#L448 

       

      Attachments

        Issue Links

          Activity

            People

              kenn.takara Kenn Takara (Inactive)
              bulat.zamalutdinov Bulat Zamalutdinov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 2 hours, 45 minutes
                  2h 45m

                  Smart Checklist