WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Moving from host with 3.23 mysql to new host with 4.1 - Syntax error #1064 (6 posts)

  1. markdanthonysr
    Member
    Posted 7 years ago #

    Exported database from mySql 3.23. Attempted import to mySql 4.1. Received following error:

    Error
    
    SQL query:
    
    -- phpMyAdmin SQL Dump
    -- version 2.6.0-pl3
    -- http://www.phpmyadmin.net
    --
    -- Host: localhost
    -- Generation Time: Jun 20, 2007 at 02:29 PM
    -- Server version: 3.23.58
    -- PHP Version: 4.3.10
    --
    -- Database: 'main_wp'
    --
    -- --------------------------------------------------------
    --
    -- Table structure for table 'wp_categories'
    --
    DROP TABLE IF EXISTS 'wp_categories' ;
    
    CREATE TABLE 'wp_categories' (
    'cat_ID' bigint( 20 ) NOT NULL AUTO_INCREMENT ,
    'cat_name' varchar( 55 ) NOT NULL default '',
    'category_nicename' varchar( 200 ) NOT NULL default '',
    'category_description' longtext NOT NULL ,
    'category_parent' bigint( 20 ) NOT NULL default '0',
    'category_count' bigint( 20 ) NOT NULL default '0',
    PRIMARY KEY ( 'cat_ID' ) ,
    KEY 'category_nicename' ( 'category_nicename' )
    ) TYPE = MYISAM AUTO_INCREMENT =36;
    
    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 'cat_ID' bigint(20) NOT NULL auto_increment,
      'cat_name' varchar(55) NOT NULL de' at line 1
  2. zomzommarketing
    Member
    Posted 7 years ago #

    It would be great to hear the fix on this too because I have almost the exact same problem. My database is 3.23.49 going to 4.1 I believe.

    The biggest issue for me is the old site is gone and the host provided the sql file in an email to me (he's a friend, don't worry), so that's all I have.

    My error on phpmyadmin doesn't tell me where the problem lies:

    #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 '---------------------------------------------------------
    -- Se

    You see, it seems to cut of the info I need.

    In any event I will follow this support question by markdanthonysr because I betting it is the same fix.

  3. zomzommarketing
    Member
    Posted 7 years ago #

    Found something:

    This
    -- MySQL dump 8.21
    --
    -- Host: localhost Database: abbeylanebandb_db1
    ---------------------------------------------------------
    -- Server version 3.23.49-log

    --
    -- Table structure for table 'wp_categories'
    --

    has to be changed to this
    -- MySQL dump 8.21
    --
    -- Host: localhost Database: abbeylanebandb_db1
    -- -------------------------------------------------------
    -- Server version 3.23.49-log

    --
    -- Table structure for table 'wp_categories'
    --

    "-- " must be added at the lone dashed line. Now there is another 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 ''wp_links'
    --

    CREATE TABLE wp_links (
    link_id bigint(20)

  4. zomzommarketing
    Member
    Posted 7 years ago #

    OK, I figured mine out.

    I opened the file into Dreamweaver which sorts out the correct spacing (I presume) because doing a paste directly didn't work.

    Once that was done (as well as adding "-- ") at the dashed line, everything worked.

    cheers

  5. markdanthonysr
    Member
    Posted 7 years ago #

    Wow, what a weird "I'd NEVER though of that" fix!

    Sure enough, I opened my saved export/query in the DreamWeaver text editor, and then saved it to a new name, and it now works when I import it to the 4.1 in 3.23 compatability mode.

    Thank you / Thank you / Thank you

    ~ Mark

  6. Organica
    Member
    Posted 7 years ago #

    Opening and doing a Save As in dreamweaver worked like a charm!

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic