如何修复错误 1064 MySQL


how can fix error 1064 mysql

Error
SQL query:
INSERT INTO `wp_postmeta` (`meta_id`, `post_id`, `meta_key`, `meta_value`) VALUES (2388, 60, '_count-views_day-20130726', '2'), 
(2389, 140, '_count-views_day-20130726', '61'), 
(2391, 82, '_count-views_day-20130726', '2'), 
(2392, 22, '_count-views_day-20130726', '23'), 
(2393, 78, '_count-views_day-20130726', '7'), 
(2394, 35, '_count-views_day-20130726', '2'), 
(2395, 32, '_count-views_day-20130726', '2'), 
(2396, 13, '_count-views_day-20130726', '1'), 
(2397, 83, '_count-views_day-20130726', '9'), 
(2398, 137, '_count-views_day-20130726', '8'), 
(2399, 90, '_count-views_day-20130726', '6'), 
(2400, 68, '_count-views_day-20130726', '1'), 
(2401, 6, '_count-views_day-20130726', '1'), 
(2402, 79, '_count-views_day-20130726', '5'), 
(2403, 33, '_count-views_day-20130726', '2'), 
(2404, 33, '_count-views_week-201330', '6'), 
(2405, 61, '_count-views_day-20130726', '8'), 
(2406, 141, '_count-views_day-20130726', '5'), 
(2408, 49, '_count-views_day-20130726', '8'), 
(2409, 22, '_count-views_day-20130727', [...]
MySQL said: Documentation
#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 ''_count' at line 1045 

如何修复该错误?我要通过MySQL导入!

看来你的 INSERT 语句太长了。

尝试在my.cnf上增加max_allowed_packet。例如,max_allowed_packet=512MB

请尝试以下通信:

mysql your_wordpress_db < your_dumped_file.sql