Hello all,
I was wondering how to dump a mysql file and found that this seems to work but the problem is I use a php script called Bigdump.php put the large sql dbs back in to SQL.

The problem seems to be that bigdump.php can not run SQL dumps with the large tables containing extended inserts.

So I found out that an extended insert contains all table entries within one SQL query.

So now I want to turn off extended inserts when exporting using this code, but I of little mind can't seem to figure it out.

Does anyone know how to do this?

        IF ( $DBName == "all" ){ $DBName = "--all-databases"; }
        $dumpdb = `/usr/bin/mysqldump -u $DBUser -p$DBPasswd $DBName -h $DBHost > '$MySQLOut'`;

Thank you for any input you may have

    If it is mysql 5 or (4.1) then add

    --skip-extended-insert

    to mysqldump options.

      25 days later

      Worked great thanks a bunch I finally decided on the following option

      $db[$dbSel]['Opt'] = '--opt --skip-extended-insert --skip-quick --add-drop-table';
      
          $CmdLine = "mysqldump -u {$db[$dbSel]['User']} --password={$db[$dbSel]['Pass']} {$db[$dbSel]['Opt']} {$db[$dbSel]['Name']} | gzip > {$file['File']}";
          passthru( $CmdLine ); #passthru -you have to use full paths on everything NO RETURN VALUE
      
      
        Write a Reply...