When I'm trying to make a full dump of the database as follows:
mysql --default-character-set=utf8 -uUSER -p database -r output.sql
It creates a UTF-8 file but all international data (Chineese,Spanish,Russian) is corrupted as follows(it's Russian part of the dump):
(1,'Ð<9e> наÑ<81>')
However, when I try to dump one table, it works fine:
mysql --default-character-set=utf8 -uUSER -p database table_name -r output.sql
I don't quite understand what causes the issue as all possible variables are set to UTF-8:
show variables like "collation_database";
+--------------------+-----------------+
| Variable_name | Value |
+--------------------+-----------------+
| collation_database | utf8_general_ci |
+--------------------+-----------------+
show variables like "character_set_database";
+------------------------+-------+
| Variable_name | Value |
+------------------------+-------+
| character_set_database | utf8 |
+------------------------+-------+
All tables also have the same charset/collation. There are the following settings in my.cnf
[client]
default-character-set=utf8
[mysql]
default-character-set=utf8
[mysqld]
collation-server = utf8_general_ci
init-connect='SET NAMES utf8'
character-set-server = utf8
And finally, locale is set to utf-8 as well. So what could be the problem of the issue? I'm pretty sure it's a dumb issue but I'm out of the ideas. I would appreciate the assistance greatly.