An improvement supported by MySQL5.1 in Chinese _ MySQL

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.