{"action":"closed","issue":{"url":"https://api.github.com/repos/sysown/proxysql/issues/636","repository_url":"https://api.github.com/repos/sysown/proxysql","labels_url":"https://api.github.com/repos/sysown/proxysql/issues/636/labels{/name}","comments_url":"https://api.github.com/repos/sysown/proxysql/issues/636/comments","events_url":"https://api.github.com/repos/sysown/proxysql/issues/636/events","html_url":"https://github.com/sysown/proxysql/issues/636","id":168870685,"number":636,"title":"proxysql_galera_checker.sh isn't correctly parsing username and password","user":{"login":"hrvojem","id":2334261,"avatar_url":"https://avatars.githubusercontent.com/u/2334261?v=3","gravatar_id":"","url":"https://api.github.com/users/hrvojem","html_url":"https://github.com/hrvojem","followers_url":"https://api.github.com/users/hrvojem/followers","following_url":"https://api.github.com/users/hrvojem/following{/other_user}","gists_url":"https://api.github.com/users/hrvojem/gists{/gist_id}","starred_url":"https://api.github.com/users/hrvojem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hrvojem/subscriptions","organizations_url":"https://api.github.com/users/hrvojem/orgs","repos_url":"https://api.github.com/users/hrvojem/repos","events_url":"https://api.github.com/users/hrvojem/events{/privacy}","received_events_url":"https://api.github.com/users/hrvojem/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-02T12:16:18Z","updated_at":"2016-08-02T13:01:29Z","closed_at":"2016-08-02T13:01:29Z","body":"proxysql_galera_checker.sh uses this query to fetch monitor credentials:\r\n\r\n`SELECT variable_value FROM global_variables WHERE variable_name IN ('mysql-monitor_username','mysql-monitor_password') ORDER BY variable_name;`\r\n\r\nand then assigns the first value to username and second to password:\r\n```\r\nMYSQL_USERNAME=$(echo $MYSQL_CREDENTIALS | awk '{print $1}')\r\nMYSQL_PASSWORD=$(echo $MYSQL_CREDENTIALS | awk '{print $2}')\r\n```\r\n\r\nBut if you check the that query the values are reversed:\r\n```\r\nSELECT variable_name FROM global_variables WHERE variable_name IN ('mysql-monitor_username','mysql-monitor_password') ORDER BY variable_name;\r\n\r\n+------------------------+\r\n| variable_name          |\r\n+------------------------+\r\n| mysql-monitor_password |\r\n| mysql-monitor_username |\r\n+------------------------+\r\n2 rows in set (0.00 sec)\r\n```\r\n\r\nSo in my case it gets:\r\n\r\nSELECT variable_value FROM global_variables WHERE variable_name IN ('mysql-monitor_username','mysql-monitor_password') ORDER BY variable_name;\r\n```\r\n+----------------+\r\n| variable_value |\r\n+----------------+\r\n| ProxySQLPa55   |\r\n| proxysql       |\r\n+----------------+\r\n2 rows in set (0.00 sec)\r\n```"}}
{"actor":{"display_login":"renecannao"}}