Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- thufir@dur:~$
- thufir@dur:~$ cat make_year_model.csv
- make1,model1,2012,604,buy now
- make2,model2,2013,780,need to sell
- make3,model3,2001,780,cheap
- thufir@dur:~$
- thufir@dur:~$ mysql -u root -p
- Enter password:
- Welcome to the MySQL monitor. Commands end with ; or \g.
- Your MySQL connection id is 60
- Server version: 5.5.37-0ubuntu0.14.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> use vehicles;
- 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>
- mysql> describe vehicles.vehicles;
- +-------+-------------+------+-----+---------+-------+
- | Field | Type | Null | Key | Default | Extra |
- +-------+-------------+------+-----+---------+-------+
- | make | varchar(45) | YES | | NULL | |
- | model | varchar(45) | YES | | NULL | |
- | year | int(11) | YES | | NULL | |
- | phone | varchar(45) | YES | | NULL | |
- | title | varchar(45) | YES | | NULL | |
- +-------+-------------+------+-----+---------+-------+
- 5 rows in set (0.00 sec)
- mysql>
- mysql> LOAD DATA LOCAL INFILE '/home/thufir/make_year_model.csv' INTO TABLE vehicles.vehicles FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n';
- ERROR 1148 (42000): The used command is not allowed with this MySQL version
- mysql>
- mysql> quit
- Bye
- thufir@dur:~$
- thufir@dur:~$
Advertisement
Add Comment
Please, Sign In to add comment