how can mysql-proxy set charset when it start running ?
Hi everyone:
how can i init charset for mysqlproxy ? make the conection to mysql is not default latin1 .
mysql> show variables like '%set%';
+--------------------------+----------------------------------+
| Variable_name | Value |
+--------------------------+----------------------------------+
| auto_increment_offset | 1 |
| character_set_client | latin1 |
| character_set_connection | latin1 |
| character_set_database | latin1 |
| character_set_filesystem | binary |
| character_set_results | latin1 |
| character_set_server | latin1 |
| character_set_system | utf8 |
| character_sets_dir | /usr/local/mysql/share/charsets/ |
+--------------------------+----------------------------------+ |
take changing to GBK for example, I know two ways to make it.
1. client can send "set names 'gbk'" to mysql
2. config mysql as default-character-set=utf8
except above ways, hwo can i init mysqlproxy charset as GBK ?
I found in tutorial-scramble.lua, there are :
proto.to_response_packet({
username = mapped.new_user,
response = password.scramble(s.scramble_buffer, password.hash(mapped.new_password)),
charset = 8, -- default charset
database = c.default_db,
max_packet_size = 1 * 1024 * 1024
then i changed the charset to 3 fot testing, when i starting mysqlproxy with loading the lua, but logon mysql, use "show variables like '%set%';", there are no changes for charset.
can anyone help me ? thanks in advance!
Subject
Views
Written By
Posted
how can mysql-proxy set charset when it start running ?
4627
November 21, 2012 04:33AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.