1

i'm trying to import a mysql dump to a new database on a different server. I have created dump by phpMyAdmin.

When i try to import to new server (with phpMyAdmin), some query generated by old server return error.

This query, for example, return error:

INSERT INTO `wp_options` VALUES(324, 'CookieLawInfo-0.9', 'a:43:{s:18:"animate_speed_hide";s:3:"500";s:18:"animate_speed_show";s:3:"500";s:10:"background";s:4:"#fff";s:14:"background_url";s:0:"";s:6:"border";s:4:"#444";s:9:"border_on";b:1;s:13:"button_1_text";s:7:"Accetto";s:12:"button_1_url";s:1:"#";s:15:"button_1_action";s:27:"#cookie_action_close_header";s:20:"button_1_link_colour";s:4:"#fff";s:16:"button_1_new_win";b:0;s:18:"button_1_as_button";b:1;s:22:"button_1_button_colour";s:4:"#000";s:20:"button_1_button_size";s:6:"medium";s:13:"button_2_text";s:17:"Maggiori dettagli";s:12:"button_2_url";s:37:"https://www.webfilla.it/cookie-policy";s:15:"button_2_action";s:17:"CONSTANT_OPEN_URL";s:20:"button_2_link_colour";s:4:"#444";s:16:"button_2_new_win";b:1;s:18:"button_2_as_button";b:0;s:22:"button_2_button_colour";s:4:"#333";s:20:"button_2_button_size";s:6:"medium";s:11:"font_family";s:7:"inherit";s:10:"header_fix";b:0;s:5:"is_on";b:1;s:19:"notify_animate_hide";b:1;s:19:"notify_animate_show";b:0;s:13:"notify_div_id";s:20:"#cookie-law-info-bar";s:26:"notify_position_horizontal";s:5:"right";s:24:"notify_position_vertical";s:6:"bottom";s:14:"notify_message";s:169:"Il nostro sito fa uso di cookie per offrire una migliore esperienza di navigazione. Continuando la navigazione autorizzi l\\''uso dei cookie. [cookie_button] [cookie_link]";s:12:"scroll_close";b:0;s:19:"scroll_close_reload";b:0;s:20:"showagain_background";s:4:"#fff";s:16:"showagain_border";s:4:"#000";s:14:"showagain_text";s:24:"Privacy & Cookies Policy";s:16:"showagain_div_id";s:22:"#cookie-law-info-again";s:13:"showagain_tab";b:0;s:20:"showagain_x_position";s:5:"100px";s:4:"text";s:4:"#000";s:17:"use_colour_picker";b:1;s:12:"show_once_yn";b:0;s:9:"show_once";s:5:"10000";}', 'yes');

Error is:

Ending quote ' was expected. (near "" at position 1440)

#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 ''a:43:{s:18:"animate_speed_hide";s:3:"500";s:18:"animate_speed_show";s:3:"500";s' at line 1

If i try to execute same query in localhost, this works fine without any error.

Today is the third day that i try to fix it, without success. Can you help me?

Best Regards, Simone

/--- EDIT ---/ Thank you scaisEdge, i really appreciate your help! However to solve problem the point is not how to edit this query to make it working, but why in some server this query already works and in some else, not? What to do to make same query working in every server?

Import file is made of hundreds query. Is impossible to edit every one by hand...

Have you any idea? Thank you!

2
  • I have an idea. phpmyadmin (or some other layer) version difference Commented Nov 13, 2015 at 19:38
  • What versions of phpMyAdmin and MySQL are running on the old server and the new server? Commented Nov 24, 2015 at 0:41

3 Answers 3

1

You to need replace \\'' with \' and it will work.

Sign up to request clarification or add additional context in comments.

Comments

0

open .sql script file in any editor(like notepad++) and

You need to replace \'' with \' (for new version of phpmyadmin)

or

You need to replace \' with \'' (for old version of phpmyadmin)

when you will replace it from all content of sql file then it will work for you good luck.

Comments

0

Could be related to the single quote

Try removing the single quote in this part of the code OR surround with a proper double quote..

Continuando la navigazione autorizzi l\\''uso dei cookie.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.