Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On Windows, I can use this statement to load XML data into the database:

  ROWS IDENTIFED BY '<product>'

However, I cannot seem to accomplish this on Ubuntu 11.2.0 with the latest version of MySQL community server installed.

This is the statement I use for my Ubuntu setup:

 LOAD XML LOCAL FILE '/home/ryan/tech.xml'
 ROWS IDENTIFIED BY '<product>';

So my question is, where do I put the XML files on my web server if I want to access them with MySQL?

share|improve this question

You have a mistake on the first line

LOAD XML LOCAL FILE '/home/ryan/tech.xml'

It is not just FILE it is INFILE

LOAD XML LOCAL INFILE '/home/ryan/tech.xml'

Read more:

All commands or queries are same in windows and linux.

share|improve this answer

You may also have an issue with line breaks - if the xml file was created on Windows, its line breaks will be different to Ubuntu's - see

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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