I have installed mysql 5.6 on debian 7.10 from official mysql deb repository:
deb http://repo.mysql.com/apt/debian/ wheezy mysql-5.6
So i have these packages installed:
# dpkg -l | grep mysql | awk '{print $2 " " $3}' | column -t
libdbd-mysql-perl 4.021-1+b1
libmysqlclient18:amd64 5.6.30-1debian7
mysql-apt-config 0.7.2-1
mysql-client 5.6.30-1debian7
mysql-common 5.6.30-1debian7
mysql-community-client 5.6.30-1debian7
mysql-community-server 5.6.30-1debian7
mysql-server 5.6.30-1debian7
I have cp1251 locale installed on my system:
# locale -a
ru_RU.cp1251
# echo $LANG
ru_RU.cp1251
And, my database and connection to it was configured properly:
# mysql
Server version: 5.6.30-log MySQL Community Server (GPL)
(none)>show variables like 'char%';
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | cp1251 |
| character_set_connection | cp1251 |
| character_set_database | cp1251 |
| character_set_filesystem | binary |
| character_set_results | cp1251 |
| character_set_server | cp1251 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0,00 sec)
And for sure my putty connection was configured to use cp1251 encoding.
But console client mysql from package mysql-client=5.6.30-1debian7 does not display anything while I'm typing non-latin (non-ascii) symbols (characters). So, for example, I can execute SELECT statement, and it's result displays correctly:
# mysql database
Server version: 5.6.30-log MySQL Community Server (GPL)
database> SELECT label FROM users LIMIT 1;
+----------------+
| label |
+----------------+
| админ |
+----------------+
1 row in set (0,00 sec)
But when I type statement "SELECT label FROM users WHERE label='админ';" like that:
database> SELECT label FROM users WHERE label='';
+----------------+
| label |
+----------------+
| админ |
+----------------+
1 row in set (0,00 sec)
It eats string админ, hiding it from my eyes, when I type it, but they are still there, so request ended with correct result.
How to fix it?