thufir

import

Jun 23rd, 2014
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. thufir@dur:~$
  2. thufir@dur:~$ cat make_year_model.csv
  3.  
  4. make1,model1,2012,604,buy now
  5. make2,model2,2013,780,need to sell
  6. make3,model3,2001,780,cheap
  7.  
  8. thufir@dur:~$
  9. thufir@dur:~$ mysql -u root -p
  10. Enter password:
  11. Welcome to the MySQL monitor. Commands end with ; or \g.
  12. Your MySQL connection id is 60
  13. Server version: 5.5.37-0ubuntu0.14.04.1 (Ubuntu)
  14.  
  15. Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
  16.  
  17. Oracle is a registered trademark of Oracle Corporation and/or its
  18. affiliates. Other names may be trademarks of their respective
  19. owners.
  20.  
  21. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  22.  
  23. mysql>
  24. mysql> use vehicles;
  25. Reading table information for completion of table and column names
  26. You can turn off this feature to get a quicker startup with -A
  27.  
  28. Database changed
  29. mysql>
  30. mysql> describe vehicles.vehicles;
  31. +-------+-------------+------+-----+---------+-------+
  32. | Field | Type | Null | Key | Default | Extra |
  33. +-------+-------------+------+-----+---------+-------+
  34. | make | varchar(45) | YES | | NULL | |
  35. | model | varchar(45) | YES | | NULL | |
  36. | year | int(11) | YES | | NULL | |
  37. | phone | varchar(45) | YES | | NULL | |
  38. | title | varchar(45) | YES | | NULL | |
  39. +-------+-------------+------+-----+---------+-------+
  40. 5 rows in set (0.00 sec)
  41.  
  42. mysql>
  43. mysql> LOAD DATA LOCAL INFILE '/home/thufir/make_year_model.csv' INTO TABLE vehicles.vehicles FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n';
  44. ERROR 1148 (42000): The used command is not allowed with this MySQL version
  45. mysql>
  46. mysql> quit
  47. Bye
  48. thufir@dur:~$
  49. thufir@dur:~$
Advertisement
Add Comment
Please, Sign In to add comment