Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

On Windows (r) I can this statement to load xml data in the database

  ROWS IDENTIFED BY '<product>'

But, I cannot seem to accomplish this on Ubuntu 11.2.0 with the latest version of MySQl communiuty 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

2 Answers 2

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: http://dev.mysql.com/doc/refman/5.5/en/load-xml.html

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 http://en.wikipedia.org/wiki/Newline

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.