sysown / proxysql

High-performance MySQL proxy with a GPL license.
http://www.proxysql.com
GNU General Public License v3.0
6.03k stars 981 forks source link

proxysql + MySQL WorkBench #1105

Open sunsingerus opened 7 years ago

sunsingerus commented 7 years ago

Is it possible to use MySQL workbench with proxysql? Got

Your connection attempt failed for user 'admin' from your host to server at 127.0.0.1:6032:
  near "SHOW": syntax error

When tried to login as admin:admin to 127.0.0.1:6032 via MySQL WorkBench

CLI command

mysql -uadmin -padmin -h127.0.0.1 -P6032

works fine.

renecannao commented 7 years ago

Please refer to this: https://www.percona.com/blog/2017/06/07/proxysql-admin-interface-not-typical-mysql-server/

If you know which SHOW command Workbench is executing, maybe I can create a workaround

sunsingerus commented 7 years ago

Please refer to this:...

Thanks, looking into!

If you know which SHOW command Workbench is executing, maybe I can create a workaround

proxysql reports these lines only :

2017-07-21 14:32:52 [INFO] Received command set autocommit=1
2017-07-21 14:32:52 [INFO] Received command SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ

and no mentions of 'SHOW' command, on which workbench is not happy, sorry

renecannao commented 7 years ago

SHOW commands are not logged in proxysql error log. You can try using tcpdump , or enabling general log on mysql server and connect to mysql server using workbench

sunsingerus commented 7 years ago

Please refer to this:

After reading these explanations, looks like the very idea to use MySQL's tools against proxysql is simply incorrect. Proxysql does not expose MySQL's SQL dialect.

You can try using tcpdump...

Got the exchange with tcpdump. But have general doubts, whether anything should be done at all (see above) Anyway, let is be here:

WorkBench to proxysql's admin port exchange log

set autocommit=1
ERROR: Unknown global variable: 'autocommit'
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ
ERROR:v Unknown global variable: 'SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ'
SHOW SESSION VARIABLES LIKE 'lower_case_table_names'
##2800near "SHOW": syntax.error

Expected result (fetched from MySQL):

mysql> SHOW SESSION VARIABLES LIKE 'lower_case_table_names';
+------------------------+-------+
| Variable_name          | Value |
+------------------------+-------+
| lower_case_table_names | 0     |
+------------------------+-------+
renecannao commented 7 years ago

It is possible to make ProxySQL's Admin reply to SHOW SESSION VARIABLES LIKE 'lower_case_table_names' . The idea behind is not to support all SQL dialect, but to avoid clients to throw errors whenever possible, without too much complication and effort.

Thanks

ZupoLlask commented 2 years ago

Hi @renecannao,

This issue is "a bit" old but it reflects my issue: for a matter of convenience, it would be great if we could make ProxySQL admin interface work through Workbench.

For that reason, I guess it's useful to reuse this issue.

Currently, using latest ProxySQL + Workbench, the first issue I'm finding is the following error:

ERROR 1045 (28000): ProxySQL Admin Error: no such function: current_user

I guess the "offending" query is SELECT current_user();.

Can you please add a response to that query?

I'm available for testing.

renecannao commented 2 years ago

@ZupoLlask : supported added in PR #3725

ItsReddi commented 2 years ago

Currently confused. I am trying proxysql docker image at the moment and still getting near "SHOW": syntax error the last posts here indicated, that this solved itself overtime or is there anything that i am missing?