Help importing 230mb sql file into databse

Discussion in 'MySQL' started by m1k3, Dec 17, 2008.

  1. #1
    Need some help, im trying to import a 230mb db into mysql from a dump file. The bigdump script throws up this error.

    BigDump: Staggered MySQL Dump Importer v0.29b
    Processing file: db.sql

    Starting from line: 1

    Stopped at the line 360.

    At this place the current query includes more than 300 dump lines. That can happen if your dump file was created by some tool which doesn't place a semicolon followed by a linebreak at the end of each query, or if your dump contains extended inserts. Please read the BigDump FAQs for more infos.



    Can anyone help?

    Thanks
     
    m1k3, Dec 17, 2008 IP
  2. GeekWarez

    GeekWarez Peon

    Messages:
    23
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    try importing from navicat :)www(dot)navicat(dot)com
     
    GeekWarez, Dec 17, 2008 IP
  3. islandhopper8

    islandhopper8 Active Member

    Messages:
    100
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    73
    #3
    You can also try EMS MySQL Manager Lite. It is free. If you need help PM me.
     
    islandhopper8, Dec 17, 2008 IP
  4. m1k3

    m1k3 Peon

    Messages:
    31
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Cheers guys, I've tried loads of stuff but no joy.

    Bigdump says its got extended inserts and just gives up
    Mysql admin tools wont restore cos it wasnt backup up with the admin tools format files.
    MYSQL CMD just doesnt know what to do

    Need help.

    If anyone can help please pm or email me

    Cheers
     
    m1k3, Dec 18, 2008 IP
  5. islandhopper8

    islandhopper8 Active Member

    Messages:
    100
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    73
    #5
    Try to break up the big file into smaller files.
    You can start with taking out the table creating parts of the file copy them over in a new file

    the Database create starts like:
    CREATE DATABASE `databasename`
    CHARACTER SET 'latin1'
    COLLATE 'latin1_swedish_ci';

    USE `databasename`;

    Then the tables look like:

    CREATE TABLE `tablename` (
    `Updateid` INTEGER(11) NOT NULL AUTO_INCREMENT,
    `artistid` INTEGER(11) DEFAULT NULL,
    `PubDate` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `Description` TEXT COLLATE latin1_swedish_ci,
    `imgid` INTEGER(11) DEFAULT NULL,
    `Title` VARCHAR(50) COLLATE latin1_swedish_ci DEFAULT NULL,
    `Approved` TINYINT(4) NOT NULL DEFAULT '0',
    `user` VARCHAR(100) COLLATE latin1_swedish_ci DEFAULT NULL,
    `dateUpdated` DATETIME DEFAULT NULL,
    PRIMARY KEY (`Updateid`)
    )ENGINE=InnoDB
    AUTO_INCREMENT=11 CHARACTER SET 'latin1' COLLATE 'latin1_swedish_ci'
    COMMENT='InnoDB free: 5120 kB';

    Put all that in one file and see if you can create the structure.

    After that you can select all the data which will look like:
    INSERT INTO `menutabs` (`menutabid`, `Tabname`, `friendlyurl`, `field3`) VALUES
    (1,'Home',' ',NULL),
    (2,'The YR Family','theyrfamily',NULL),
    (3,'Programs','programs',NULL),
    (4,'Company','company',NULL),
    (5,'Fun Stuff','funstuff',NULL),
    (6,'Music','music',NULL),
    (7,'Links','links',NULL),
    (8,'Stats','stats',NULL);
    COMMIT;

    If you have large blocks of data try to split up into blocks like this and you can save those blocks in separate files.
    INSERT INTO `menutabs` (`menutabid`, `Tabname`, `friendlyurl`, `field3`) VALUES
    (1,'Home',' ',NULL),
    (2,'The YR Family','theyrfamily',NULL),
    (3,'Programs','programs',NULL);
    COMMIT;

    INSERT INTO `menutabs` (`menutabid`, `Tabname`, `friendlyurl`, `field3`) VALUES
    (4,'Company','company',NULL),
    (5,'Fun Stuff','funstuff',NULL),
    (6,'Music','music',NULL);
    COMMIT;

    INSERT INTO `menutabs` (`menutabid`, `Tabname`, `friendlyurl`, `field3`) VALUES
    (7,'Links','links',NULL),
    (8,'Stats','stats',NULL);
    COMMIT;


    The advantage of splitting it up you might also find where it goes wrong. I know that I had issues with long comments add to the creation of the tables.

    Hope this helps.
     
    islandhopper8, Dec 18, 2008 IP