large DB with just one insert query

Discussion in 'MySQL' started by ottodo, Dec 1, 2006.

  1. #1
    I got large DB dump file with just one insert query :mad:
    if each row has it's insert command, that's fine I can manage it,

    but what I should do with one insert for 300K records :confused:
     
    ottodo, Dec 1, 2006 IP
  2. Pat Gael

    Pat Gael Banned

    Messages:
    1,331
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    0
    #2
    that is strange, try to dump it via PhpMyAdmon or BigDump and then export the query as, cvs?

    not sure, this is weird to me.
     
    Pat Gael, Dec 1, 2006 IP
  3. PayItForward

    PayItForward Peon

    Messages:
    752
    Likes Received:
    43
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Export it using PhpMyAdmin, which comes with cPanel, then import it the same way. Like Pat Gael said, you should probably export it as a CVS.
     
    PayItForward, Dec 1, 2006 IP
  4. saidev

    saidev Well-Known Member

    Messages:
    328
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    140
    #4
    The one insert record was probably a dump from mysqldump with --extended-insert. This allow you to have faster import when you try to restore the database.

    Not sure what is the limit of PHPMyAdmin as I don't use it personally, I do believe you can select a database than upload a mysqldump file to import when I used it a few years ago.

    If you have access to the console, you can login using

    mysql -u [username] -p;
    create database [databasename];
    use [databasename];
    source [path_of_dump_file];

    Hope this help.
     
    saidev, Dec 1, 2006 IP
  5. CodyRo

    CodyRo Peon

    Messages:
    365
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #5
    mysql -uuser -ppass -Ddatabase < sqlstuff.sql

    I usually import using the above command.. keep in mind phpMyAdmin has a 2MB limit on the sql file.
     
    CodyRo, Dec 2, 2006 IP
  6. JEET

    JEET Notable Member

    Messages:
    3,832
    Likes Received:
    502
    Best Answers:
    19
    Trophy Points:
    265
    #6
    Why don't you contact your host and ask them to do it for you?
    They probably can handle it better :)
     
    JEET, Dec 2, 2006 IP