Professional Web Applications Themes

Is this file corrupt? - MySQL

I got this file from another web host. It has some syntax that I have not seen before. Importing it gererates an error. ERROR 1064 at line 2: 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 'ID` smallint(10) NOT NULL auto_increment, `County` varchar(25 head -100 grcadmi_GRCDB-1.sql CREATE TABLE `12COUNTIES` (e `12COUNTIES`------------------ `ID` smallint(10) NOT NULL auto_increment, `County` varchar(255) NOT NULL default '', `City` varchar(255) NOT NULL default '', PRIMARY KEY (`ID`) CREATE TABLE `9COUNTIES` (le `9COUNTIES`-------------------inos');ista'););'); `ID` smallint(10) NOT NULL auto_increment, `County` varchar(255) ...

  1. #1

    Default Is this file corrupt?

    I got this file from another web host. It has some syntax that I have
    not seen before. Importing it gererates an error.

    ERROR 1064 at line 2: 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 'ID` smallint(10) NOT NULL auto_increment,
    `County` varchar(25


    head -100 grcadmi_GRCDB-1.sql
    CREATE TABLE `12COUNTIES` (e `12COUNTIES`------------------
    `ID` smallint(10) NOT NULL auto_increment,
    `County` varchar(255) NOT NULL default '',
    `City` varchar(255) NOT NULL default '',
    PRIMARY KEY (`ID`)
    CREATE TABLE `9COUNTIES` (le
    `9COUNTIES`-------------------inos');ista'););');
    `ID` smallint(10) NOT NULL auto_increment,
    `County` varchar(255) NOT NULL default '',
    `City` varchar(255) NOT NULL default '',
    PRIMARY KEY (`ID`)
    CREATE TABLE `AAE_INTAKE` (e
    `AAE_INTAKE`------------------)');ion');osta)');
    `IntakeID` int(10) NOT NULL auto_increment,
    `IntakeDate` datetime NOT NULL default '0000-00-00 00:00:00',
    `IntakeCompleted` varchar(5) NOT NULL default '',
    `ContactID` int(10) NOT NULL default '0


    specifically I think the long lines of dashes are causing the error? I
    am not sure though. Does anyone know? Is there a way to fix the file?

    ivan Guest

  2. #2

    Default Re: Is this file corrupt?

    ivan at sustainablemarketing [dot] com wrote:
     

    looks like the file needs some cleanup... what kind of file (mysqldump??)?


    --
    Michael Austin.
    Database Consultant
    Michael Guest

  3. #3

    Default Re: Is this file corrupt?

    If I cut/paste into MySQL it complains like mad, as does yours. But with a
    little tidy up, I have the following, which work fine. So in answer to your
    question, I would say that the long lines of dashes are your problem. Are
    there some options that you can configure for the output dump in the program
    you have used to create the file?

    It could be that your program is dumping the data to file with the intention
    that it will be used to read the file back in, rather than you trying to use
    the content of the dumped data.

    CREATE TABLE `12COUNTIES`
    (
    `ID` smallint(10) NOT NULL auto_increment,
    `County` varchar(255) NOT NULL default '',
    `City` varchar(255) NOT NULL default '',
    PRIMARY KEY (`ID`)
    );
    CREATE TABLE `9COUNTIES`
    (
    `ID` smallint(10) NOT NULL auto_increment,
    `County` varchar(255) NOT NULL default '',
    `City` varchar(255) NOT NULL default '',
    PRIMARY KEY (`ID`)
    );
    CREATE TABLE `AAE_INTAKE`
    (
    `IntakeID` int(10) NOT NULL auto_increment,
    `IntakeDate` datetime NOT NULL default '0000-00-00 00:00:00',
    `IntakeCompleted` varchar(5) NOT NULL default '',
    `ContactID` int(10) NOT NULL default '0',
    PRIMARY KEY (`IntakeID`)
    )



    SA



    Sean Guest

Similar Threads

  1. HELP!!! .fla file corrupt, what about swf?
    By Syndicate5 in forum Macromedia Flash Sitedesign
    Replies: 5
    Last Post: June 6th, 01:51 AM
  2. jump rope.dir is not a director file + file is corrupt
    By ceg1 webforumsuser@macromedia.com in forum Macromedia Director Basics
    Replies: 1
    Last Post: November 3rd, 05:29 PM
  3. MX File gets corrupt!
    By shiro-hagen webforumsuser@macromedia.com in forum Macromedia Freehand
    Replies: 4
    Last Post: July 16th, 08:07 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139