Proxysql server version

2,202 views
Skip to first unread message

Brian Lai

unread,
May 27, 2016, 3:33:57 AM5/27/16
to proxysql
Hi again,

   When checking proxysql server version, found that it is based on 5.1.30 version mysql. 

    May I know is there any planned upgrade for the proxysql server version? We have some usage issue like 
1. utf8mb4 (ProxySQL does not recognize "SET NAMES utf8mb4" during init, http://stackoverflow.com/questions/21911733/error-1115-42000-unknown-character-set-utf8mb4 ), and 
2. language parameter (http://bugs.mysql.com/bug.php?id=77665

     We try to bypass it by using older version of mysql connectors or skip SET NAMES to init utf8mb4. Appreciate your kind feedback. Many thanks :)

Regards,
Brian

René Cannaò

unread,
May 27, 2016, 4:13:11 AM5/27/16
to Brian Lai, proxysql
Hi Brian,

"5.1.30" is only a string that the proxy uses to introduce itself to the client. I choose it randomly as first 5.1 GA .
That means you can change it to "5.5.51" or "5.6.30" , or even "5.9.1000-my-special-build" :)

To make an example, I can run these command on the Admin interface:

admin> SET mysql-server_version="5.8.1-proxysql-fake-version"; LOAD MYSQL VARIABLES TO RUNTIME;
Query OK, 1 row affected (0.01 sec)

Query OK, 0 rows affected (0.00 sec)


Then, when I try to connect to ProxySQL on port 6033 with a regular mysql client, I will get this message (see "Server version") :

 mysql -u user -ppass -h 127.0.0.1 -P6033
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 2
Server version: 5.8.1-proxysql-fake-version (ProxySQL)

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.





With regards to supported charsets, ProxySQL supports all the charset supported by the client library it is linked with. To be more specific :

admin> SELECT DISTINCT Charset FROM mysql_collations;
+----------+
| Charset  |
+----------+
| big5     |
| latin2   |
| dec8     |
| cp850    |
| latin1   |
| hp8      |
| koi8r    |
| swe7     |
| ascii    |
| ujis     |
| sjis     |
| cp1251   |
| hebrew   |
| filename |
| tis620   |
| euckr    |
| latin7   |
| koi8u    |
| gb2312   |
| greek    |
| cp1250   |
| gbk      |
| cp1257   |
| latin5   |
| armscii8 |
| utf8     |
| ucs2     |
| cp866    |
| keybcs2  |
| macce    |
| macroman |
| cp852    |
| utf8mb4  |
| utf16    |
| utf16le  |
| cp1256   |
| utf32    |
| binary   |
| geostd8  |
| cp932    |
| eucjpms  |
+----------+
41 rows in set (0.00 sec)

admin> SELECT DISTINCT Charset FROM mysql_collations WHERE Charset LIKE 'utf8%';
+---------+
| Charset |
+---------+
| utf8    |
| utf8mb4 |
+---------+
2 rows in set (0.00 sec)

Therefore, SET NAMES utf8mb4 is full supported! What is not supported is SET NAMES charset COLLATE collation , for example SET NAMES utf8mb4 COLLATE utf8mb4_general_ci .
There is a bug open for this : https://github.com/sysown/proxysql/issues/554 .
If your application uses only "SET NAMES utf8mb4" you should be good.




About language : this shouldn't be a problem at all, because the request should be forward to a backend and processed there.


On a different topic: is your application using prepared statements? ProxySQL doesn't support them yet, but it will in a month or less.

Thank you,
René

--
You received this message because you are subscribed to the Google Groups "proxysql" group.
To unsubscribe from this group and stop receiving emails from it, send an email to proxysql+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

叮咚

unread,
Jun 6, 2018, 7:30:09 AM6/6/18
to proxysql
hello,i came across a problem, it dose'nt simply a sring  i thought.
blewo is my situation:


when  set mysql-server_version ='5.5.30';
tcpdump mysql :

audit_user
content_audit
mysql_native_password
/* mysql-connector-java-5.1.38 ( Revision: fe541c166cec739c74cc727c5da96c1028b4834a ) */SELECT  @@session.auto_increment_increment AS auto_increment_increment, @@character_set_client AS character_set_client, @@character_set_connection AS character_set_connection, @@character_set_results AS character_set_results, @@character_set_server AS character_set_server, @@init_connect AS init_connect, @@interactive_timeout AS interactive_timeout, @@license AS license, @@lower_case_table_names AS lower_case_table_names, @@max_allowed_packet AS max_allowed_packet, @@net_buffer_length AS net_buffer_length, @@net_write_timeout AS net_write_timeout, @@query_cache_size AS query_cache_size, @@query_cache_type AS query_cache_type, @@sql_mode AS sql_mode, @@system_time_zone AS system_time_zone, @@time_zone AS time_zone, @@tx_isolation AS tx_isolation, @@wait_timeout AS wait_timeout
SET NAMES utf8
SET character_set_results = NULL
SET autocommit=1
SET sql_mode='STRICT_TRANS_TABLES'
select 1

when  set mysql-server_version ='5.1.63';

tcpdump mysql :

set mysql-server_version ='5.1.63';
/* mysql-connector-java-5.1.38 ( Revision: fe541c166cec739c74cc727c5da96c1028b4834a ) */SELECT  @@session.auto_increment_increment AS auto_increment_increment, @@character_set_client AS character_set_client, @@character_set_connection AS character_set_connection, @@character_set_results AS character_set_results, @@character_set_server AS character_set_server, @@init_connect AS init_connect, @@interactive_timeout AS interactive_timeout, @@language AS language, @@license AS license, @@lower_case_table_names AS lower_case_table_names, @@max_allowed_packet AS max_allowed_packet, @@net_buffer_length AS net_buffer_length, @@net_write_timeout AS net_write_timeout, @@query_cache_size AS query_cache_size, @@query_cache_type AS query_cache_type, @@sql_mode AS sql_mode, @@system_time_zone AS system_time_zone, @@time_zone AS time_zone, @@tx_isolation AS tx_isolation, @@wait_timeout AS wait_timeout



AND proxysql  log

018-06-06 19:02:02 MySQL_Session.cpp:2779:handler(): [WARNING] Error during query on (200,172.26.0.64,3322): 1193, Unknown system variable 'language'


last  my java programe did not start because  this error "Caused by: java.sql.SQLException: Unknown system variable 'language'

叮咚

unread,
Jun 6, 2018, 7:33:58 AM6/6/18
to proxysql
so if i have mysql version from 5.1 to 5.6   backend in the same proxysql  how can i  set mysql-server_version


On Friday, 27 May 2016 16:13:11 UTC+8, René Cannaò wrote:

René Cannaò

unread,
Jun 6, 2018, 7:38:56 AM6/6/18
to proxysql

System variable "language" was removed in 5.5.0 :

If you are using a mysql server 5.5+ , you should configure mysql-server_version accordingly.
The default value (5.5.30) is good.
If you change it to 5.1.63 , JDBC driver believe that it is MySQL 5.1.63 and try to select the "language" variable, that doesn't exist anymore.


About your last question: if i have mysql version from 5.1 to 5.6   backend in the same proxysql  how can i  set mysql-server_version

I think should be enough to use the default 5.5.30 .
I don't think JDBC will try to retrieve a system variable not present in 5.1

Nonetheless, if you are using 5.1 ... you really must upgrade. MySQL 5.1 reached end-of-life in 2013 .

Thanks,
René


To unsubscribe from this group and stop receiving emails from it, send an email to proxysql+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages