-
mysql> LOAD DATA LOCAL INFILE '/home/shell/log.txt' INTO TABLE pet;
-
ERROR 1148 (42000): The used command is not allowed with this MySQL version
-
mysql>
-
mysql>
解决办法
http://dev.mysql.com/doc/refman/5.5/en/load-data-local.html
-
root@mh3:~# mysql -proot --local-infile=1
-
Welcome to the MySQL monitor. Commands end with ; or \g.
-
Your MySQL connection id is 45
-
Server version: 5.5.37-0ubuntu0.12.04.1 (Ubuntu)
-
-
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
-
-
Oracle is a registered trademark of Oracle Corporation and/or its
-
affiliates. Other names may be trademarks of their respective
-
owners.
-
-
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
-
-
mysql>
-
mysql> LOAD DATA LOCAL INFILE '/home/shell/log.txt' INTO TABLE pet;
-
ERROR 1046 (3D000): No database selected
-
mysql> use test;
-
Reading table information for completion of table and column names
-
You can turn off this feature to get a quicker startup with -A
-
-
Database changed
-
mysql> LOAD DATA LOCAL INFILE '/home/shell/pet.txt' INTO TABLE pet;
-
Query OK, 8 rows affected, 7 warnings (0.17 sec)
-
Records: 8 Deleted: 0 Skipped: 0 Warnings: 7
-
-
mysql>
-
mysql>
这个问题是客户端的问题,但也不是什么大问题。写下了,省得下次再查文档
阅读(3265) | 评论(0) | 转发(0) |