简体   繁体   中英

MySQL LOAD XML LOCAL INFILE

I'm building an application on my local machine, and for the longest time, was using Windows 7 with MySQL installed, but as I've now moved onto Linux, I'm trying to execute this statement:

LOAD XML LOCAL INFILE 'http://example.com/tech.xml'

INTO TABLE t

ROWS IDENTIFIED BY '<product>';

This is not working, and I do have all the privileges necessary in order to accomplish this.

How can I make this statement work?

When I was using Windows (r) the statement would work perfectly. Where do I put the file on my web server if I want to access it via MySQL?

I get this error:

Error Code: 1064. You have an error in your SQL syntax; check the manual that          
corresponds to your MySQL server version for the right 
syntax to use near 'XML LOCAL INFILE 'http://example.com/tech.xml'

INTO TABLE t

ROWS IDENTIFIE' at line 1

LOAD XML INFILE is available from mySQL 5.2 and higher.

You probably have an older version than that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM