I am on a Linux ubuntu machine with MySQL installed.

My teacher gave out an assignment which mentioned "copy cars.dat to /data/tmp on the MySQL database server" without any explanations, I do not know what is the "/data/tmp on database server" means exactly?

Basically after that I need to execute SQL statement like

LOAD DATA INFILE '/data/tmp/cars.dat' INTO TABLE cars

So, what does copy cars.dat to /data/tmp on the database server means as there is no /data/tmp directory even?

Personally, I checked /etc/mysql/my.cnf file, inside which there are definitions of :

...
basedir     = /usr
datadir     = /var/lib/mysql
tmpdir      = /tmp
...

Does it mean to copy cars.dat to the tmpdir which is just /tmp under root directory??

link|improve this question
It's home work, so explain what are the possibilies you examined before post ! – Dom Nov 30 '11 at 17:04
@ Dom, I updated my post which includes what I examined. – Mellon Nov 30 '11 at 17:07
feedback

closed as not constructive by mdpc, mrdenny Nov 30 '11 at 18:32

This question is not a good fit to our Q&A format. We expect answers to generally involve facts, references, or specific expertise; this question will likely solicit opinion, debate, arguments, polling, or extended discussion. See the FAQ for guidance on how to improve it.

1 Answer

up vote 2 down vote accepted

Hmm, sounds like he's used to a Solaris system maybe?

I'd say do one of:

  1. copy cars.dat to a directory of your choice (your home, /tmp, etc) and change the path in LOAD DATA INFILE
  2. create /data/tmp with sudo mkdir -p /data/tmp and carry on
  3. ask your teacher
  4. dog ate my homework
link|improve this answer
+1, dog ate my homework. – Jeff Ferland Nov 30 '11 at 17:36
feedback

Not the answer you're looking for? Browse other questions tagged or ask your own question.