Mysql Dump Restor

I am trying to restore a mysql dump file which has gotten on another server but non latin chars seems like the given image below after restore, but on the other server it work perfect ;


i am checking set names latin5 but every time i disconnect and come back it returns to latin1 maybe this could be the problem i do not know but i am exactly sure when i restore this dump on other server (which is not mine ) it restores all chars correctly
mysql> show variables like '%chara%';
+--------------------------+----------------------------+
| Variable_name            | Value                      |
+--------------------------+----------------------------+
| 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/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.00 sec)

mysql> set names 'latin5';
Query OK, 0 rows affected (0.00 sec)

mysql> show variables like '%chara%';
+--------------------------+----------------------------+
| Variable_name            | Value                      |
+--------------------------+----------------------------+
| character_set_client     | latin5                     |
| character_set_connection | latin5                     |
| character_set_database   | latin1                     |
| character_set_filesystem | binary                     |
| character_set_results    | latin5                     |
| character_set_server     | latin1                     |
| character_set_system     | utf8                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.00 sec)

mysql>

Open in new window

maxi1.png
LVL 1
CahitEyAsked:
Who is Participating?
 
cjl7freelance for hireCommented:
Hi,

you can set the --default-character-set when you restore...

mysql --default-character-set=latin5 < dump-file


//jonas
0
 
CahitEyAuthor Commented:
And this is the result of other servers
show variables like '%chara%';


 	 Variable_name	 Value
 	
character_set_client
latin5
 	
character_set_connection
latin5
 	
character_set_database
utf8
 	
character_set_filesystem
binary
 	
character_set_results
latin5
 	
character_set_server
latin5
 	
character_set_system
utf8
 	
character_sets_dir
/usr/share/mysql/charsets/

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.