Click here to get back home

failing to import an export from phpMyAdmin

 HomeNewsGroups | Search | About
 mailing.database.mysql    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
failing to import an export from phpMyAdmin laredotornado 10-30-2006
Posted by laredotornado on October 30, 2006, 12:33 pm
Please log in for more thread options
Hello,

My hosting company has MySQL 5 and so do I on my local Fedora Core 5
Linux machine. However, when I import a dump file from their
enviornment into mine, I get this error

ERROR 1064 (42000) at line 21428: 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 'TABLE `EC_SAVED_ORDER_LINE_ITEMS`
ADD CONSTRAINT `FK1_SAVED_ORDER_LINE_ITEMS` ' at line 3

This is the line (and those around it) from my file. It is complaining
about the first line. What is the problem?

ALTER TABLE `EC_SAVED_ORDER_LINE_ITEMS`
ADD CONSTRAINT `FK1_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY
(`ORDER_FORM_PRINTER_ID`) REFERENCES `ORDER_FORM_PRINTERS`
(`ORDER_FORM_PRINTER_ID`) ON DELETE CASCADE,
ALTER TABLE `EC_SAVED_ORDER_LINE_ITEMS`
ADD CONSTRAINT `FK1_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY
(`ORDER_FORM_PRINTER_ID`) REFERENCES `ORDER_FORM_PRINTERS`
(`ORDER_FORM_PRINTER_ID`) ON DELETE CASCADE, ADD CONSTRAINT
`FK2_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY (`PRODUCT_ID`) REFERENCES
`PROD_PRODUCTS` (`PRODUCT_ID`) ON DELETE CASCADE,
ALTER TABLE `EC_SAVED_ORDER_LINE_ITEMS`
ADD CONSTRAINT `FK1_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY
(`ORDER_FORM_PRINTER_ID`) REFERENCES `ORDER_FORM_PRINTERS`
(`ORDER_FORM_PRINTER_ID`) ON DELETE CASCADE, ADD CONSTRAINT
`FK2_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY (`PRODUCT_ID`) REFERENCES
`PROD_PRODUCTS` (`PRODUCT_ID`) ON DELETE CASCADE, ADD CONSTRAINT
`FK3_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY (`TRANSACTION_ID`) REFERENCES
`EC_SAVED_ORDERS` (`TRANSACTION_ID`) ON DELETE CASCADE;

Thanks, - Dave


Posted by Jeff North on October 30, 2006, 3:32 pm
Please log in for more thread options
On 30 Oct 2006 09:33:41 -0800, in mailing.database.mysql
laredotornado@zipmail.com

>| Hello,
>|
>| My hosting company has MySQL 5 and so do I on my local Fedora Core 5
>| Linux machine. However, when I import a dump file from their
>| enviornment into mine, I get this error
>|
>| ERROR 1064 (42000) at line 21428: 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 'TABLE `EC_SAVED_ORDER_LINE_ITEMS`
>| ADD CONSTRAINT `FK1_SAVED_ORDER_LINE_ITEMS` ' at line 3

The keyword is 'near'.
Have a look at the preceding lines as they're more likely to be
causing the problem.
---------------------------------------------------------------
jnorthau@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------

Posted by davie on October 31, 2006, 3:39 am
Please log in for more thread options
Have you created table EC_SAVED_ORDER_LINE_ITEMS ???
laredotornado@zipmail.com wrote:
> Hello,
>
> My hosting company has MySQL 5 and so do I on my local Fedora Core 5
> Linux machine. However, when I import a dump file from their
> enviornment into mine, I get this error
>
> ERROR 1064 (42000) at line 21428: 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 'TABLE `EC_SAVED_ORDER_LINE_ITEMS`
> ADD CONSTRAINT `FK1_SAVED_ORDER_LINE_ITEMS` ' at line 3
>
> This is the line (and those around it) from my file. It is complaining
> about the first line. What is the problem?
>
> ALTER TABLE `EC_SAVED_ORDER_LINE_ITEMS`
> ADD CONSTRAINT `FK1_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY
> (`ORDER_FORM_PRINTER_ID`) REFERENCES `ORDER_FORM_PRINTERS`
> (`ORDER_FORM_PRINTER_ID`) ON DELETE CASCADE,
> ALTER TABLE `EC_SAVED_ORDER_LINE_ITEMS`
> ADD CONSTRAINT `FK1_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY
> (`ORDER_FORM_PRINTER_ID`) REFERENCES `ORDER_FORM_PRINTERS`
> (`ORDER_FORM_PRINTER_ID`) ON DELETE CASCADE, ADD CONSTRAINT
> `FK2_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY (`PRODUCT_ID`) REFERENCES
> `PROD_PRODUCTS` (`PRODUCT_ID`) ON DELETE CASCADE,
> ALTER TABLE `EC_SAVED_ORDER_LINE_ITEMS`
> ADD CONSTRAINT `FK1_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY
> (`ORDER_FORM_PRINTER_ID`) REFERENCES `ORDER_FORM_PRINTERS`
> (`ORDER_FORM_PRINTER_ID`) ON DELETE CASCADE, ADD CONSTRAINT
> `FK2_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY (`PRODUCT_ID`) REFERENCES
> `PROD_PRODUCTS` (`PRODUCT_ID`) ON DELETE CASCADE, ADD CONSTRAINT
> `FK3_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY (`TRANSACTION_ID`) REFERENCES
> `EC_SAVED_ORDERS` (`TRANSACTION_ID`) ON DELETE CASCADE;
>
> Thanks, - Dave


Posted by lark on October 31, 2006, 9:24 am
Please log in for more thread options
also, i'd look at the table being referenced: order_form_printers and
make sure it's pk is set correctly.



davie wrote:
> Have you created table EC_SAVED_ORDER_LINE_ITEMS ???
> laredotornado@zipmail.com wrote:
>> Hello,
>>
>> My hosting company has MySQL 5 and so do I on my local Fedora Core 5
>> Linux machine. However, when I import a dump file from their
>> enviornment into mine, I get this error
>>
>> ERROR 1064 (42000) at line 21428: 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 'TABLE `EC_SAVED_ORDER_LINE_ITEMS`
>> ADD CONSTRAINT `FK1_SAVED_ORDER_LINE_ITEMS` ' at line 3
>>
>> This is the line (and those around it) from my file. It is complaining
>> about the first line. What is the problem?
>>
>> ALTER TABLE `EC_SAVED_ORDER_LINE_ITEMS`
>> ADD CONSTRAINT `FK1_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY
>> (`ORDER_FORM_PRINTER_ID`) REFERENCES `ORDER_FORM_PRINTERS`
>> (`ORDER_FORM_PRINTER_ID`) ON DELETE CASCADE,
>> ALTER TABLE `EC_SAVED_ORDER_LINE_ITEMS`
>> ADD CONSTRAINT `FK1_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY
>> (`ORDER_FORM_PRINTER_ID`) REFERENCES `ORDER_FORM_PRINTERS`
>> (`ORDER_FORM_PRINTER_ID`) ON DELETE CASCADE, ADD CONSTRAINT
>> `FK2_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY (`PRODUCT_ID`) REFERENCES
>> `PROD_PRODUCTS` (`PRODUCT_ID`) ON DELETE CASCADE,
>> ALTER TABLE `EC_SAVED_ORDER_LINE_ITEMS`
>> ADD CONSTRAINT `FK1_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY
>> (`ORDER_FORM_PRINTER_ID`) REFERENCES `ORDER_FORM_PRINTERS`
>> (`ORDER_FORM_PRINTER_ID`) ON DELETE CASCADE, ADD CONSTRAINT
>> `FK2_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY (`PRODUCT_ID`) REFERENCES
>> `PROD_PRODUCTS` (`PRODUCT_ID`) ON DELETE CASCADE, ADD CONSTRAINT
>> `FK3_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY (`TRANSACTION_ID`) REFERENCES
>> `EC_SAVED_ORDERS` (`TRANSACTION_ID`) ON DELETE CASCADE;
>>
>> Thanks, - Dave
>

Similar ThreadsPosted
MySQL export/import problem June 19, 2005, 3:52 pm
Can you import/export using MySQL Administrator? January 25, 2006, 2:11 pm
MySQL / PHPMyAdmin import from Access; txt's don't work! June 17, 2006, 7:49 pm
SET failing March 9, 2006, 5:34 pm
BLOB Update failing on SQLParamData January 13, 2006, 6:41 am
sql to do CSV export from MySQL May 26, 2006, 8:17 am
Failing tests with Fedora Core 5 running on i386 but not x86_86 August 14, 2006, 3:06 pm
Export MYSQL database to install on ISP ASP.Net April 2, 2006, 3:15 pm
Importing with phpMyAdmin February 8, 2007, 9:40 pm
phpmyadmin: size unknown July 19, 2005, 4:35 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap