MySQL 5.1的中文支援的一個改進

來源:互聯網
上載者:User

  MySQL 5.1的中文支援的一個改進,從MySQL 4.1開始不支援中文路徑,檔案名稱的問題解決了。

  見下面樣本

  Microsoft Windows XP [版本 5.1.2600]

  (C) 著作權 1985-2001 Microsoft Corp.

  C:\Documents and Settings\Administrator>runas /user:aaa cmd

  輸入 aaa 的密碼:

  試圖將 cmd 作為使用者 "MY-TOMATO\aaa" 啟動...

  C:\Documents and Settings\Administrator>cd \mysql51\bin

  C:\mysql51\bin>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/豬八戒.txt';
Query OK, 11 rows affected (0.00 sec)

  mysql> select * from tr into outfile 'c:/mysql51/建立檔案夾/豬八戒.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/建立檔案夾/豬八戒.txt' into table tr2;
Query OK, 11 rows affected (0.00 sec)
Records: 11 Deleted: 0 Skipped: 0 Warnings: 0

  mysql>
C:\mysql51\bin>mysqladmin -u root shutdown

  C:\mysql51\bin>cd \mysql50\bin

  C:\mysql50\bin>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/建立檔案夾/豬八戒.txt' into table tr;
ERROR 29 (HY000): File 'c:\mysql51\脨脗陸簍脦脛錄鎂錄脨\脰鉚擄脣陸盲.txt' not fo
und (Errcode: 2)
mysql>

相關文章

Beyond APAC's No.1 Cloud

19.6% IaaS Market Share in Asia Pacific - Gartner IT Service report, 2018

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。