• Resolved jetshack

    (@jetshack)


    I’m in the process of moving a WP site to another host. I’ve been running into problems moving the database over, but after searching through the forums I’ve been able to get all of the tables installed and working except for the wp_posts table

    Specifically I’m getting this error

    #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 ” at line 1

    the ” is where I’m stumped. All of the other errors I was able to mess around with and figure out…

    There are literally hundreds of these fields…. is there some sort of NULL setting I can do a global replace with?

    i.e. find ” replace with ‘NULL’
    sort of thing.

Viewing 15 replies - 1 through 15 (of 37 total)
  • Can you paste the complete error message as reported by MySQL, so we can see exactly what’s happening?

    Thread Starter jetshack

    (@jetshack)

    #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 ” at line 1

    Thread Starter jetshack

    (@jetshack)

    also as an example… here’s the data from the sql… through the first post…

    code
    DROP TABLE IF EXISTS wp_posts;
    CREATE TABLE wp_posts (
    ID bigint(20) unsigned NOT NULL auto_increment,
    post_author int(4) NOT NULL default ‘0’,
    post_date datetime NOT NULL default ‘0000-00-00 00:00:00’,
    post_date_gmt datetime NOT NULL default ‘0000-00-00 00:00:00’,
    post_content longtext NOT NULL,
    post_title text NOT NULL,
    post_category int(4) NOT NULL default ‘0’,
    post_excerpt text NOT NULL,
    post_status enum(‘publish’,’draft’,’private’,’static’,’object’) NOT NULL default ‘publish’,
    comment_status enum(‘open’,’closed’,’registered_only’) NOT NULL default ‘open’,
    ping_status enum(‘open’,’closed’) NOT NULL default ‘open’,
    post_password varchar(20) NOT NULL default ”,
    post_name varchar(200) NOT NULL default ”,
    to_ping text NOT NULL,
    pinged text NOT NULL,
    post_modified datetime NOT NULL default ‘0000-00-00 00:00:00’,
    post_modified_gmt datetime NOT NULL default ‘0000-00-00 00:00:00’,
    post_content_filtered text NOT NULL,
    post_parent int(11) NOT NULL default ‘0’,
    guid varchar(255) NOT NULL default ”,
    menu_order int(11) NOT NULL default ‘0’,
    post_excerpt_filtered text NOT NULL,
    PRIMARY KEY (ID),
    KEY post_name (post_name),
    KEY post_status (post_status)
    );
    /*!40000 ALTER TABLE wp_posts DISABLE KEYS */;
    LOCK TABLES wp_posts WRITE;
    INSERT INTO wp_posts (ID, post_author, post_date, post_date_gmt, post_content, post_title, post_category, post_excerpt, post_status, comment_status, ping_status, post_password, post_name, to_ping, pinged, post_modified, post_modified_gmt, post_content_filtered, post_parent, guid, menu_order, post_excerpt_filtered) VALUES (21,1,’2000-05-05 02:12:25′,’2000-05-04 20:42:25′,'<font size=\”1\”>An unidentified transvestite protests Rockers return to New York</font><img title=\”05.05.00.jpg\” style=\”width: 260px; height: 200px\” height=\”200\” alt=\”05.05.00.jpg\” hspace=\”5\” src=\”https://docfell.net/images/05.05.00.jpg\” width=\”260\” align=\”left\” border=\”0\” /><font size=\”1\”>By Charles Shaft
    Associated Press</font>
    Returning to New York for the first time since making prejudice remarks during last years playoffs, John Rocker of the Atlanta Braves was greeted by a lone protester outside Yankee stadium. The person, an unidentified transvestite, set fire to a stack of Barry Manilow albums and danced around the flames chanting "let your freak flag fly baby!", while the Braves arrived for their pre-game workout. "I just want him(Rocker) to know that the voice of freedom can not be suppressed," claimed the person. "As far as I\’m concerned he and Jerry Falwell can kiss my hairy butt." After ten minutes NY police grew weary of the spectacle and beat the protestor into a coma with their night sticks. "We really wanted to kill the queer little punk but then he wouldn\’t learn his lesson," said officer Bryan O\’Peltzer. Later Rocker was questioned about the incident, "She looked pretty hot to me," he said. "Maybe we had a one night stand and she was pissed or something. I don\’t know what her problem was the silly bitch." ‘,’code

    Do any of these links help?
    https://www.modwest.com/help/kb6-265.html
    https://www.vbulletin.com/forum/showthread.php?t=40831

    What are the contents of the line it is complaining about?

    try this:

    Open the .sql file
    Look for a block near the start
    --
    -- Table structure for table
    wp_categories
    --

    In the block that follows, look at the LAST line. It might be similar to this:

    ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=19 ;

    If it is, you need to remove the “DEFAULT CHARSET=latin1” parts (there are 9 in total in the sql file). Do a find/replace and put nothing where it was.
    Then try the restore again.

    If that is not the error, post back ?

    If what you pasted was the whole line, it’s quite possible the line got truncated, and is missing a semi-colon.

    Thread Starter jetshack

    (@jetshack)

    they helped with some of the original errors when there was something located between the ticks…

    but this is due to there not being anything between the ” I think…

    Thread Starter jetshack

    (@jetshack)

    I already did away with all of the
    DEFAULT CHARSET=latin1
    entries….

    doing so was one of the things I had to do to get all the other tables inserted…

    BTW: thanks to you for that podz… i found your mentioning that in another thread

    Email me the .sql file and I’ll take a look ?
    tamba2 @ gmail . com

    I’ll get back to you really quick ??

    Thread Starter jetshack

    (@jetshack)

    I also had to do away with all of the


    — Table structure for table information

    entries as well… it didn’t like the – character

    Can you send the original unaltered exported file ?

    Thread Starter jetshack

    (@jetshack)

    should be on the way

    edit

    should be on the way again… i screwed up the addie the first time

    Hmm…
    Unzipped it.
    Renamed it so it had the .sql extention
    Opened it in Notepad++
    Select All > Copy
    Then pasted the file into the SQL tab of phpMyAdmin
    And it’s gone in without any errors.

    I’m running:
    Welcome to phpMyAdmin 2.6.3-pl1
    MySQL 4.1.13 running on localhost as root@localhost

    Where are you moving to ?

    Looking more at the file, there IS an error.
    It is in the Dashboard feeds which are also stored in the db and you are having to carry over.

    If you have access to the original db and phpmyadmin, we can eliminate this stuff before doing an export.

    Thread Starter jetshack

    (@jetshack)

    MySQL 4.0.25-
    phpadmin 2.6.3-pl1

Viewing 15 replies - 1 through 15 (of 37 total)
  • The topic ‘switched host – mysql error #1064 – nearly figured out’ is closed to new replies.