Program for opening large MySQL dumps

Is there a GUI program that can read large MySQL dumps (+ 200 MB) or is it really some kind of large text file?

Most modern editors seem to be unable to process large files because they seem to like loading the entire file into memory.

I want to open it on Ubuntu (Linux), but I would also like to read it on Windows.

+3
source share
2 answers

vi (or Vim) can handle this without a problem.

+4
source

, , PHP- ( ), gedit , .

, : , ( , , ) "tables" :

<?php
// Put here the name of the Huge sql file
$hugeFileName="test.sql";

$text=file_get_contents($hugeFileName);
$arr=explode("-- Table structure for table", $text);

$first=true;

if(!is_dir("tables")){
    mkdir("tables");
}

foreach($arr as $table){
if($first){
    $first=false;
    continue;
}

list($tableName, $tableCreate, $nothing, $nothing, $tableData)=explode("--", $table);


$tableName=trim($tableName, "\n");
$tableName=trim($tableName, " ");
$tableName=trim($tableName, "`");
$tableName=trim($tableName, "`\r");

file_put_contents("tables/".$tableName.".sql", $tableCreate.$tableData);
}?>
0

Source: https://habr.com/ru/post/1748176/


All Articles