Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

right syntax to use near ''2009-09-01 23' at line 1? Error

11:54 pm on May 27, 2010 (gmt 0)

New User

5+ Year Member

joined:Mar 17, 2010
votes: 0

I keep getting this error. I'm changing my wordpress site that was on a shared server to a dedicated server and when I try and IMPORT the database in phpmyadmin this error pops up, but its only for the wp_post part which in MY OPINION is most important.

"right syntax to use near ''2009-09-01 23' at line 1 wordpress database"

Any help or workarounds? I tried posting piece by piece but its over 89 articles on the site...:/

thanks ahead
3:29 am on May 28, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 28, 2004
votes: 0

Well, what little bit I can glean from that is that the date, or the datetime value, needs to be quoted.

insert into table(created) values('2009-09-01');

insert into table(created) values('2009-09-01 23:15:12');

Are you importing from a mysqldump or an exported delimited file? In the latter case, a line break in the wrong place would do it.
11:35 pm on June 2, 2010 (gmt 0)

New User

5+ Year Member

joined:Mar 17, 2010
votes: 0

it is a mysqldump... file extention mysql.txt
12:03 am on June 3, 2010 (gmt 0)

New User

10+ Year Member

joined:Aug 3, 2005
posts: 12
votes: 0

must be some issue with your export/import compatibility then. If you try to import your script to your webhoster then it is very likely that you don't have permissions to use certain mysql commands (GRAND, FILE, CREATE, DROP) depending on your hosting provider and package - you would expect a "no permission" error message here, but i have also seen "syntax error" messages in this case sometimes. you could try to export your data again, but without the "create table" and without the "drop table if exits" option and then import it again via phpmyadmin - this should work if you already have a blank wordpress installation with a compatible database @ your new hoster.

the file extension is irrelephant here.

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members