mysql字符集问题 请教怎么解决
Enter password: ********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 16
Server version: 5.1.30-community-log MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use database t23g;
ERROR 1049 (42000): Unknown database 'database'
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| t23g |
| temp |
+--------------------+
4 rows in set (0.01 sec)
mysql> use t23g;
Database changed
mysql> show tables;
+----------------+
| Tables_in_t23g |
+----------------+
| map_ids |
+----------------+
1 row in set (0.03 sec)
mysql> show variables like '%char%';
+--------------------------+---------------------------------------------------+
| Variable_name | Value |
+--------------------------+---------------------------------------------------+
| character_set_client | latin1 |
| character_set_connection | latin1 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | latin1 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | D:\Web\wamp\bin\mysql\mysql5.1.30\share\charsets\ |
+--------------------------+---------------------------------------------------+
8 rows in set (0.01 sec)
mysql> set names utf8;
Query OK, 0 rows affected (0.00 sec)
mysql> load data local infile 'D:\\t23gdatabase\\map_ids.txt' into table map_ids
-> lines terminated by '\r\n';
Query OK, 165 rows affected, 165 warnings (0.04 sec)
Records: 165 Deleted: 0 Skipped: 0 Warnings: 1
mysql> show warnings
-> ;
+---------+------+--------------------------------------------------------------
-----------------------+
| Level | Code | Message
|
+---------+------+--------------------------------------------------------------
-----------------------+
| Warning | 1366 | Incorrect string value: '\xC5\xDA\xB9\xDC'' for column 'c_nam
e' at row 1 |
| Warning | 1366 | Incorrect string value: '\xBB\xFA\xBF\xF2' for column 'c_name
' at row 2 |
| Warning | 1366 | Incorrect string value: '\xB8\xB4\xBD\xF8\xBB\xFA' for column
'c_name' at row 3 |
| Warning | 1366 | Incorrect string value: '\xBB\xBA\xB3\xE5\xC6\xF7' for column
'c_name' at row 4 |
| Warning | 1366 | Incorrect string value: '\xC5\xDA\xCE\xB2' for column 'c_name
' at row 5 |
| Warning | 1366 | Incorrect string value: '\xB7\xA2\xC9\xE4\xBB\xFA...' for col
umn 'c_name' at row 6 |
| Warning | 1366 | Incorrect string value: '\xC5\xDA\xCF\xE4\xB8\xC7...' for col
umn 'c_name' at row 7 |
| Warning | 1366 | Incorrect string value: '\xC5\xDA\xCF\xE4\xB8\xC7' for column
'c_name' at row 8 |
| Warning | 1366 | Incorrect string value: '\xC5\xDA\xE3\xC5' for column 'c_name
' at row 9 |
| Warning | 1366 | Incorrect string value: '\xB1\xF0\xD5\xEB' for column 'c_name
' at row 10 |
| Warning | 1366 | Incorrect string value: '\xC5\xE4\xCD\xEA\xD5\xFB...' for col
umn 'c_name' at row 11 |
| Warning | 1366 | Incorrect string value: '\xC5\xDA\xB9\xDC' for column 'c_name
' at row 12 |
| Warning | 1366 | Incorrect string value: '\xCF\xFA 5x3...' for column 'c_name'
at row 13 |
| Warning | 1366 | Incorrect string value: '\xB5\xBC\xC6\xF8\xB9\xBF' for column
'c_name' at row 14 |
| Warning | 1366 | Incorrect string value: '\xB5\xF7\xBD\xDA\xC8\xFB' for column
'c_name' at row 15 |
| Warning | 1366 | Incorrect string value: '\xB5\xF7\xBD\xDA\xC8\xFB...' for col
umn 'c_name' at row 16 |
| Warning | 1366 | Incorrect string value: '\xCF\xFB\xD1\xE6\xC6\xF7' for column
'c_name' at row 17 |
| Warning | 1366 | Incorrect string value: '\xCC\xE1\xB0\xD1' for column 'c_name
' at row 18 |
| Warning | 1366 | Incorrect string value: '\xC5\xDA\xCF\xE4' for column 'c_name
' at row 19 |
| Warning | 1366 | Incorrect string value: '\xCD\xCB\xBF\xC7\xC6\xF7...' for col
umn 'c_name' at row 20 |
| Warning | 1366 | Incorrect string value: '\xCD\xCB\xBF\xC7\xC6\xF7' for column
'c_name' at row 21 |
| Warning | 1366 | Incorrect string value: '\xB7\xC0\xB3\xBE\xC6\xAC' for column
'c_name' at row 22 |
| Warning | 1366 | Incorrect string value: '\xB9\xCC\xB6\xA8\xCB\xA8...' for col
umn 'c_name' at row 23 |
| Warning | 1366 | Incorrect string value: '\xB7\xB4\xCC\xF8\xCB\xF8' for column
'c_name' at row 24 |
| Warning | 1366 | Incorrect string value: '\xB7\xB4\xCC\xF8\xCB\xF8...' for col
umn 'c_name' at row 25 |
| Warning | 1366 | Incorrect string value: '\xB5\xB2\xCC\xFA' for column 'c_name
' at row 26 |
| Warning | 1366 | Incorrect string value: '\xB5\xB2\xCC\xFA\xCF\xFA' for column
'c_name' at row 27 |
| Warning | 1366 | Incorrect string value: '\xB1\xF0\xD5\xEB' for column 'c_name
' at row 28 |
| Warning | 1265 | Data truncated for column 'cid' at row 29
|
| Warning | 1366 | Incorrect string value: '\xB8\xC7' for column 'c_name' at row
29 |
| Warning | 1366 | Incorrect string value: '\xD7\xD4\xB6\xAF\xBB\xFA...' for col
umn 'c_name' at row 30 |
| Warning | 1366 | Incorrect string value: '\xBB\xA4\xD5\xD6' for column 'c_name
' at row 31 |
| Warning | 1366 | Incorrect string value: '\xBA\xF3\xB8\xC7' for column 'c_name
' at row 32 |
| Warning | 1366 | Incorrect string value: '\xBA\xF3\xCF\xDE\xD6\xC6...' for col
umn 'c_name' at row 33 |
| Warning | 1366 | Incorrect string value: '\xBA\xF3\xCF\xDE\xD6\xC6...' for col
umn 'c_name' at row 34 |
| Warning | 1366 | Incorrect string value: '\xD7\xD4\xB6\xAF\xBF\xDB...' for col
umn 'c_name' at row 35 |
| Warning | 1366 | Incorrect string value: '\xD7\xD4\xB6\xAF\xBF\xDB...' for col
umn 'c_name' at row 36 |
| Warning | 1366 | Incorrect string value: '\xD7\xD4\xB6\xAF\xBF\xDB...' for col
umn 'c_name' at row 37 |
| Warning | 1366 | Incorrect string value: '\xB9\xCC\xB6\xA8\xCB\xA9...' for col
umn 'c_name' at row 38 |
| Warning | 1366 | Incorrect string value: '\xB1\xFA' for column 'c_name' at row
39 |
| Warning | 1366 | Incorrect string value: '\xCA\xD6\xB1\xFA' for column 'c_name
' at row 40 |
| Warning | 1366 | Incorrect string value: '\xB5\xBC\xB8\xCB' for column 'c_name
' at row 41 |
| Warning | 1366 | Incorrect string value: '\xCA\xD6\xB1\xFA\xBB\xC9' for column
'c_name' at row 42 |
| Warning | 1366 | Incorrect string value: '\xB8\xDC\xB8\xCB' for column 'c_name
' at row 43 |
| Warning | 1366 | Incorrect string value: '\xB1\xFA\xD6\xE1' for column 'c_name
' at row 44 |
| Warning | 1366 | Incorrect string value: '\xB9\xCC\xB6\xA8\xB1\xFA...' for col
umn 'c_name' at row 45 |
| Warning | 1366 | Incorrect string value: '\xB8\xDC\xB8\xCB\xD6\xE1' for column
'c_name' at row 46 |
| Warning | 1366 | Incorrect string value: '\xB9\xCC\xB6\xA8\xCB\xA8' for column
'c_name' at row 47 |
| Warning | 1366 | Incorrect string value: '\xC2\xDD\xC8\xFB' for column 'c_name
' at row 48 |
| Warning | 1366 | Incorrect string value: '\xCD\xCB\xBF\xC7\xC6\xF7...' for col
umn 'c_name' at row 49 |
| Warning | 1366 | Incorrect string value: '\xCD\xCB\xBF\xCD\xC6\xF7' for column
'c_name' at row 50 |
| Warning | 1366 | Incorrect string value: '\xB7\xC0\xB3\xBE\xC6\xAC' for column
'c_name' at row 51 |
| Warning | 1366 | Incorrect string value: '\xB7\xB4\xCC\xF8\xCB\xF8' for column
'c_name' at row 52 |
| Warning | 1366 | Incorrect string value: '\xB7\xB4\xCC\xF8\xCB\xF8...' for col
umn 'c_name' at row 53 |
| Warning | 1366 | Incorrect string value: '\xB5\xB2\xCC\xFA' for column 'c_name
' at row 54 |
| Warning | 1366 | Incorrect string value: '\xB5\xB2\xCC\xFA\xCF\xFA' for column
'c_name' at row 55 |
| Warning | 1366 | Incorrect string value: '\xB1\xF0\xD5\xEB' for column 'c_name
' at row 56 |
| Warning | 1366 | Incorrect string value: '\xBB\xA4\xD5\xD6' for column 'c_name
' at row 57 |
| Warning | 1366 | Incorrect string value: '\xBA\xF3\xCF\xDE\xD6\xC6...' for col
umn 'c_name' at row 58 |
| Warning | 1366 | Incorrect string value: '\xBA\xF3\xCF\xDE\xD6\xC6...' for col
umn 'c_name' at row 59 |
| Warning | 1366 | Incorrect string value: '\xD7\xD4\xB6\xAF\xBF\xDB...' for col
umn 'c_name' at row 60 |
| Warning | 1366 | Incorrect string value: '\xD3\xD2\xC7\xB0\xB8\xC7' for column
'c_name' at row 61 |
| Warning | 1366 | Incorrect string value: '\xBB\xA4\xB8\xC7' for column 'c_name
' at row 62 |
| Warning | 1366 | Incorrect string value: '\xBF\xA8\xB3\xDD' for column 'c_name
' at row 63 |
+---------+------+--------------------------------------------------------------
-----------------------+
64 rows in set (0.00 sec)
mysql>
yejr
周六, 2009/02/14 - 12:29
Permalink
先看看本站关于字符
先看看本站关于字符集的faq吧,搞明白字符集是怎么回事
MySQL方案、培训、支持