thufir

mysqlimport

Jun 24th, 2014
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.93 KB | None | 0 0
  1. thufir@dur:~$
  2. thufir@dur:~$ mysqlimport vehicles abc.csv -u root -p
  3. Enter password:
  4. mysqlimport: Error: 1146, Table 'vehicles.abc' doesn't exist, when using table: abc
  5. thufir@dur:~$
  6. thufir@dur:~$
  7. thufir@dur:~$ mysqlimport vehicles vehicles abc.csv -u root -p
  8. Enter password:
  9. mysqlimport: Error: 13, Can't get stat of '/var/lib/mysql/vehicles/vehicles' (Errcode: 2), when using table: vehicles
  10. thufir@dur:~$
  11. thufir@dur:~$ cat abc.csv
  12.  
  13. a1,b1,31,41,e1
  14. a2,b2,32,42,e2
  15. a3,b3,33,43,e3
  16.  
  17. thufir@dur:~$
  18. thufir@dur:~$ mysql -u root -p
  19. Enter password:
  20. Welcome to the MySQL monitor. Commands end with ; or \g.
  21. Your MySQL connection id is 60
  22. Server version: 5.5.37-0ubuntu0.14.04.1 (Ubuntu)
  23.  
  24. Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
  25.  
  26. Oracle is a registered trademark of Oracle Corporation and/or its
  27. affiliates. Other names may be trademarks of their respective
  28. owners.
  29.  
  30. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  31.  
  32. mysql>
  33. mysql> use vehicles;
  34. Reading table information for completion of table and column names
  35. You can turn off this feature to get a quicker startup with -A
  36.  
  37. Database changed
  38. mysql> show tables;
  39. +--------------------+
  40. | Tables_in_vehicles |
  41. +--------------------+
  42. | vehicles |
  43. +--------------------+
  44. 1 row in set (0.00 sec)
  45.  
  46. mysql> describe vehicles;
  47. +-------+-------------+------+-----+---------+-------+
  48. | Field | Type | Null | Key | Default | Extra |
  49. +-------+-------------+------+-----+---------+-------+
  50. | make | varchar(45) | YES | | NULL | |
  51. | model | varchar(45) | YES | | NULL | |
  52. | year | int(11) | YES | | NULL | |
  53. | phone | varchar(45) | YES | | NULL | |
  54. | title | varchar(45) | YES | | NULL | |
  55. +-------+-------------+------+-----+---------+-------+
  56. 5 rows in set (0.00 sec)
  57.  
  58. mysql> quit
  59. Bye
  60. thufir@dur:~$
  61. thufir@dur:~$
Advertisement
Add Comment
Please, Sign In to add comment