MySQL 5.1 does not support Chinese paths since MySQL 4.1. the file name problem is solved.
See the following example.
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C: Documents and SettingsAdministrator> runas/user: aaa cmd
Enter the aaa password:
Trying to start cmd as user "MY-TOMATOaaa...
C: Documents and SettingsAdministrator> cd mysql51in
C: mysql51in> mysql-u root
Welcome to the MySQL monitor. Commands end with; or g.
Your MySQL connection id is 1 to server version: 5.1.7-beta-community
Type 'help; 'or 'H' for help. Type 'C' to clear the buffer.
Mysql> use test
Database changed
Mysql> show tables;
+ ---------------- +
| Tables_in_test |
+ ---------------- +
| Tr |
| Trb3 |
+ ---------------- +
2 rows in set (0.00 sec)
Mysql> desc tr;
+ ----------- + ------------- + ------ + ----- + --------- + ------- +
| Field | Type | Null | Key | Default | Extra |
+ ----------- + ------------- + ------ + ----- + --------- + ------- +
| Id | int (11) | YES | NULL |
| Name | varchar (50) | YES | NULL |
| Purchased | date | YES | NULL |
+ ----------- + ------------- + ------ + ----- + --------- + ------- +
3 rows in set (0.00 sec)
Mysql> insert into tr (id, name) values (1, 'ewr'), (2, 'sr'), (3, 'gh ');
Query OK, 3 rows affected (0.00 sec)
Records: 3 Duplicates: 0 Warnings: 0
Mysql> select * from tr into outfile 'C:/mysql51/pig. txt ';
Query OK, 11 rows affected (0.00 sec)
Mysql> select * from tr into outfile 'C:/mysql51/New Folder/ .txt ';
Query OK, 11 rows affected (0.02 sec)
Mysql> create table tr2 as select * from tr limit 0;
Query OK, 0 rows affected (0.06 sec)
Records: 0 Duplicates: 0 Warnings: 0
Mysql> select * from tr2;
Empty set (0.00 sec)
Mysql> load data infile 'C:/mysql51/create a folder/pig 8. txt 'into table tr2;
Query OK, 11 rows affected (0.00 sec)
Records: 11 Deleted: 0 Skipped: 0 Warnings: 0
Mysql>
C: mysql51in> mysqladmin-u root shutdown
C: mysql51in> cd mysql50in
C: mysql50in> mysql-u root
Welcome to the MySQL monitor. Commands end with; or g.
Your MySQL connection id is 1 to server version: 5.0.18
Type 'help; 'or 'H' for help. Type 'C' to clear the buffer.
Mysql> use test
Database changed
Mysql> create table tr (id INT, name VARCHAR (50), purchased DATE)
->;
Query OK, 0 rows affected (0.05 sec)
Mysql> load data infile 'C:/mysql51/create a folder/ .txt 'into table tr;
ERROR 29 (HY000): File 'C: mysql51