Importing XML into an AWS RDS instance
Posted
by
RoyHB
on Server Fault
See other posts from Server Fault
or by RoyHB
Published on 2012-08-24T03:13:03Z
Indexed on
2012/09/08
3:39 UTC
Read the original article
Hit count: 558
I'm trying to load some xml into an AWS RDS (mySql) instance.
The xml looks like: (it's an xml dump of the ISO-3661 codes)
<?xml version="1.0" encoding="UTF-8"?>
<countries>
<countries name="Afghanistan" alpha-2="AF" alpha-3="AFG" country-code="004" iso_3166-2="ISO 3166-2:AF" region-code="142" sub-region-code="034"/>
<countries name="Åland Islands" alpha-2="AX" alpha-3="ALA" country-code="248" iso_3166-2="ISO 3166-2:AX" region-code="150" sub-region-code="154"/>
<countries name="Albania" alpha-2="AL" alpha-3="ALB" country-code="008" iso_3166-2="ISO 3166-2:AL" region-code="150" sub-region-code="039"/>
<countries name="Algeria" alpha-2="DZ" alpha-3="DZA" country-code="012" iso_3166-2="ISO 3166-2:DZ" region-code="002" sub-region-code="015"/>
The command that I'm running is:
LOAD XML LOCAL INFILE '/var/www/ISO-3166_SMS_Country_Codes.xml' INTO TABLE `ISO-3661-codes`(`name`,`alpha-2`,`alpha-3`,`country-code`,`region-code`,`sub-region-code`);
The error message I get is:
ERROR 1148 (42000): The used command is not allowed with this MySQL version
The infile that is referenced exists, I've selected a database before running the command and I have appropriate privileges on the database. The column names in the database table exactly match the xml field names.
© Server Fault or respective owner