Jump to content

Error #1064: syntax error in .sql file


Seager

Recommended Posts

Hello, I exported a MySQL database from a working(!) test version of a WordPress website, to import it while getting the site live.

On my notebook, I copied the contents of the database to MS Word in order to modify it using Ctrl-F 'find and replace' function.

That's the only way I modified anything.

During importing the localhost.sql file, the error below occurred. The message says: line 2....

 

Any idea what's wrong with it now, anybody??

Thanks in advance!

 

Error

SQL-query:

INSERT INTO `wp_options` ( `option_id` , `option_name` , `option_value` , `autoload` ) 
VALUES ( 878, '_transient_feed_ac0b00fe65abe10e0c5b588f3ed8c7ca', 'a:4:{s:5:"child";a:1:{s:0:"";a:1:{s:3:"rss";a:1:{i:0;a:6:{s:4:"data";s:3:"\n\n\n";s:7:"attribs";a:1:{s:0:"";a:1:{s:7:"version";s:3:"2.0";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:1:{s:0:"";a:1:{s:7:"channel";a:1:{i:0;a:6:{s:4:"data";s:51:"\n \n \n \n \n \n \n \n INSERT INTO `wp_options` (`option_id`, `option_name`, `option_value`, `autoload`) VALUES (885, '_transient_timeout_feed_mod_a5420c83891a9c88ad2a4f04584a5efc ', '1382682331 ', 'no '), (886, '_transient_feed_mod_a5420c83891a9c88ad2a4f04584a5efc ', '1382639131 ', 'no '), (883, '_transient_timeout_feed_a5420c83891a9c88ad2a4f04584a5efc ', '1382682331 ', 'no '), (884, '_transient_feed_a5420c83891a9c88ad2a4f04584a5efc ', 'a :4 : {s :5 : "child";

 

MySQL retourneerde: b_help.png

#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 '_transient_timeout_feed_mod_a5420c83891a9c88ad2a4f04584a5efc', '1382682331', 'no' at line 2 

 

 

Link to comment
Share on other sites

Word probably converted your quotes in the so called "smart quotes". Never use Word to modify or create programming code, use a plain text editor like notepad instead.

 

Edit: Your query looks like it is also corrupt. Your previous INSERT query seems to be cut off in the middle of it. You may have accidentally deleted part of it when making your modifications.

 

Using a fresh unmodified backup, open the file in Notepad and repeat your modifications, take care to not break the SQL structure in doing so.

Edited by kicken
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.