Seager Posted October 28, 2013 Share Posted October 28, 2013 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! ErrorSQL-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: #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 Quote Link to comment https://forums.phpfreaks.com/topic/283376-error-1064-syntax-error-in-sql-file/ Share on other sites More sharing options...
kicken Posted October 28, 2013 Share Posted October 28, 2013 (edited) 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 October 28, 2013 by kicken Quote Link to comment https://forums.phpfreaks.com/topic/283376-error-1064-syntax-error-in-sql-file/#findComment-1455864 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.