Skip to content

Importowanie dużych baz mysql

Czytając różne fora często natrafiam na tematy związane z kwestią importu dużych baz mysql. Używając do tego phpmyadmin (standardowo) pojawia się problem z ograniczeniami lub timeoutem. Jednak jest na to bardzo prosty sposób, a raczej skrypt napisany przez Alexey’a Ozerova, można go pobrać klikając tutaj.

Poniżej krótka instrukcja użycia narzędzia:

Rozpakowujemy archiwum i otwieramy bigdump.php dowolnym edytorem php. Skaczemy do linkijki #40 i uzupełniamy dane bazy:

$db_server = ‘localhost’; //najczęściej localhost lub inny podany przez providera hostingu
$db_name = ”; //nazwa bazy
$db_username = ”; //użytkownik
$db_password = ”; //hasło

W kolejnych kilku linijkach uzupełniamy pola:

$csv_insert_table = ”; // OPCJONALNIE – żródło tabel jeśli importujemy plik .csv
$ajax = true; // użycie AJAX (true/false): jeśli tak import bez odświeżania strony
$filename = ”; // nazwa pliku importowanego (np.’import.sql’)
$linespersession = 3000; // Liczba linijek importowanych podczas jednej sesji
$delaypersession = 0; // Czas przerwy pomiędzy sesjami w milisekundach
// Działa tylko przy włączonym javascript. Zapobiega przeciążaniu serwera.

Możemy także ustawić zestaw znaków, który będzie używany przy imporcie (powinien być taki sam w jakim zakodowany jest plik importowany, np.’utf8′) w linijce #65

$db_connection_charset = ”;

Plik zapisujemy i wrzucamy na serwer razem z importowanym plikiem.
W przeglądarce odpalamy http://[adres_url]/bigdump.php i postępujemy zgodnie z instrukcjami na ekranie aż do pojawienia się infomacji o sukcesie i wtedy otwieramy piwko i nie męczymy for zbędnymi tematami:)

Ważne:

  • pamiętaj o odpowiednim eksporcie bazy danych, tzn. nie należy używać rozszerzonych dodań (extended inserts) – należy odznaczyć tą opcję przy eksporcie z phpmyadmin
  • jeśli otrzymujesz timeout error zmniejsz $linespersession w pliku bigdump.php
  • jeśli podczas importu serwer mysql padnie należy ustawić odpowiednio duży $delaypersession w w pliku bigdump.php

Powodzenia !!

6 Comments Post a comment
  1. ADZ #

    Witam
    Jak podłączyć bazę danych do konta znajdującą sie na innym serwerze??
    Pozdrawiam
    Adrian

    Wrzesień 9, 2007
  2. Ustawić odpowiedni adres serwera MySQL = mysql_connect(„adres_serwera_mysql”, „uzytkownik”, „haslo”)

    Wrzesień 10, 2007
  3. ADZ #

    Wpisałem adres serwera MySQL czyli costam.cal.pl ale nie działa, a gdy wpisuje to zamiast localhost na serwerze cal.pl to wtedy działa, co zrobić żeby działo to również na innym serwerze??
    Pozdrawiam
    Adrian

    Wrzesień 10, 2007
  4. Być może cal.pl blokuje dostęp do mysql z innych serwerów, proponuje skontaktować się z ich BOK-iem. Pozdrawiam.

    Wrzesień 11, 2007
  5. newbie #

    A gdzie mam mieć tą bazę którą chce zimportować na serwer? Mam ją wrzucić na serer do katalogu gdzie mam ten plik bigdump.php? Wiem że to pytanie wyda się wam śmieszne ale jestem zielony w tym temacie i nie moge sobie poradzić żeby zgrać moją baze (pand 200mb)

    Luty 5, 2008
  6. SpeX #

    Witam, a ja mam pytanie czy da się jeszcze jakoś w tym bigdump nie importować bazę, a uzupełnić już istniejącą. Chodzi mi o to iż posiadam galerie zdjęć z zaimportowanymi zdjęciami że stare. I potrzebuję wgrać opisy tych zdjęć które mam importowane że starej galerii. I chce po prostu te 2 bazy połączyć (porównując nazwę zdjęcia)

    Czerwiec 7, 2008

Leave a Reply

You may use basic HTML in your comments. Your email address will not be published.

Subscribe to this comment feed via RSS

  • Buy Cheap phentermine wordwide shipping online Online Online Prices For phentermine wordwide shipping online! Best Prices.
  • Buy Cheap information about diet pills Now Pharmacy Store. Buy Medications Online.
  • Buy Cheapest bactrim pregnancy Now Best Drugstore. Drugs, Health And Beauty.
  • Buy Cheap online cod tramadol Online Cheap Online Pharmacy. Guaranteed Shipping.
  • Buy Cheap ultram no prescription Online Best Online. Pharmacy At The Best Price!
  • Buy Cheap fat burners Now WorldWide Shipping. Buy Medications Online.
  • Buy Cheapest atenolol medication Now Low Prices. 100% Satisfaction Guaranteed.
  • Buy Cheapest foreign alprazolam Now Cheap Online Pharmacy. Online Medical Shop.
  • Buy Cheap viagra supplement Now No Prescription Needed. Online Medical Shop.
  • Buy Cheapest what is zetia Now Best Drugstore. No Prescription Needed.
  • Buy Cheap cialis cream Online Special Prices For cialis cream! Best Drugstore.
  • Buy Cheapest heart attack pill Now Discount Online Pharmacy. Best Online.
  • Buy Cheap generic name viagra Online Free Viagra Pills! Online Medical Shop.
  • Buy Cheapest order valium without prescription Online Cheap Online Pharmacy. Best Drugstore.
  • Buy Cheap cheap antidepressant pills Now 24/Internet)(safe Pharmacy. Low Prices.
  • Buy Cheapest ultram addiction Online Cheap Online Pharmacy. Pharmacy Store.
  • Buy Cheap rx pain medicine online Now Online Medical Shop. Cheap Online Pharmacy.
  • Buy Cheapest spironolactone effects Online Free Viagra Pills! Pharmacy Store.
  • Buy Cheap no prescription pain meds Now No Prescription Needed. Free Viagra Pills!
  • Buy Cheapest cats anti inflammatory Online 24/Online Pharmacy. Best Internet.
  • Buy Cheap cause of male hair loss Now Guaranteed Shipping. Cheap Online Pharmacy.
  • Buy Cheap ambien overdose Online Cheap Prescription Drugs. Best Internet.
  • Buy Cheapest discounted tramadol Online Best Online. Discount Online Pharmacy.
  • Buy Cheapest how to relieve a headache Now Cheap Online Pharmacy. Pharmacy Store.
  • Buy Cheapest tramadol pain Online Low Prices. Cheap Prescription Drugs.
  • Buy Cheap viagra prescription uk Now Buy Medications Online. WorldWide Shipping.
  • Buy Cheap weight loss exercise tips Online Online Prices For weight loss exercise tips! Best Drugstore.
  • Buy Cheap side effects of alprazolam Now 100% Satisfaction Guaranteed. Pharmacy Store.
  • Buy Cheap total health enhancement Now WorldWide Shipping. Online Prices For total health enhancement!
  • Buy Cheap pain medication online pharmacy Now Best Online. The Largest Internet Pharmacy.
  • Buy Cheap viagra cheapest online sellers Now Free Viagra Pills! Cheap Online Pharmacy.
  • side effects of amoxicillin Online Without Prescription No Prescription Online Pharmacy.
  • Buy Cheapest body fat lose Now 24/Online Pharmacy. WorldWide Shipping.
  • Buy Cheap buy ativan without prescription Now Cheap Prescription Drugs. WorldWide Shipping.
  • Buy Cheap very cheap viagra Online Low Prices. The Largest Internet Pharmacy.
  • Buy Cheapest dysfunction erectile levitra Online Online Medical Shop. Free Viagra Pills!
  • Buy Cheap buying diet pills online Now Free Viagra Pills! Discount Pharmacy Online.
  • Buy Cheap viagra sideffects Now Guaranteed Shipping. Buy Medications Online.
  • Buy Cheap buy prescription medicine online Now Buy Medications Online. Cheap Pharmacy Online.
  • Buy Cheapest pain relieving gel Now Free Viagra Pills! Cheap Online Pharmacy.
  • Buying Cheap medication prescription. Worldwide Rx, Good Prices. WorldWide Shipping.
  • Buy Cheap levitra quit working Online Free Viagra Pills! Online Medical Shop.
  • Buy Cheapest fat burning supplement Now Best Prices. Drugs, Health And Beauty.
  • Buy Cheap medications for depression Online Best Prices. Discount Online Pharmacy.
  • Buy Cheap clonazepam muscle Now Drugs, Health And Beauty. Guaranteed Shipping.
  • Buy Cheapest ultram online without prescription Now Guaranteed Shipping. Top Online Pharmacy.
  • Buy Cheap canadian cialis Online Online Medical Shop. Cheap Pharmacy Online.
  • Buy Cheapest texas vardenafil levitra hcl Online Top Online Pharmacy. WorldWide Shipping.
  • lexapro paxil Online Without Prescription Best Internet. Best Prices.
  • Buy Cheapest fluconazole diflucan Now Best Drugstore. Cheap Online Pharmacy.
  • Buy Cheapest tadalafil lowest price guarantee Online Best Drugstore. Cheap Pharmacy Online.
  • Buy Cheap dosage for amoxicillin Now Best Online. The Largest Internet Pharmacy.
  • Buy Cheapest addiction valium Now 24/Online Pharmacy. Top Online Pharmacy.
  • Buy online medication Without Prescription Doctor. Low Prices. Pharmacy Store.
  • Buy Cheapest anti anxiety medications purchase online Online Online Medical Shop. WorldWide Shipping.
  • Buy Cheapest buy cialis on line Now Cheap Prescription Drugs. Best Internet.
  • Buy Cheapest non generic cialis Now Free Viagra Pills! WorldWide Shipping.
  • Buy Cheap international pharmacy klonopin Online Best Prices. Pharmacy At The Best Price!
  • Buy Cheapest tramadol pain Now Low Prices. The Largest Internet Pharmacy.
  • Buy Cheapest viagra patch Now Discount Online Pharmacy. Pharmacy Store.
  • Buy Cheapest lipitor drug interactions Now No Prescription Needed. WorldWide Shipping.
  • Buy Cheapest low cost zolpidem Now Pharmacy Store. Discount Pharmacy Online.
  • Buy Cheap clomid 25mg Now Best Drugstore. Order Cheap Meds Without Rx.
  • levitra erectile dysfunction Online Without Prescription Best Online. Best Prices.
  • international no script codeine Online Without Prescription Low Prices. Best Internet.
  • Buy Cheapest where to buy valium Online Guaranteed Shipping. WorldWide Shipping.
  • Buy Cheap how to relieve menstrual cramps Now Special Prices For how to relieve menstrual cramps! Best Online.
  • Buy Cheapest discount canadian pharmacy Now Internet Prices For discount canadian pharmacy! Best Internet.
  • Buy Cheapest online purchase ultram Online Drugs, Health And Beauty. Best Online.
  • Buy Cheap cialis free trials Now Low Prices. Pharmacy At The Best Price!
  • Buy Cheap glucophage side effects Now 24/Internet)(safe Pharmacy. Best Prices.
  • Buy Cheap discount drug store Online Best Drugstore. Buy Medications Online.
  • Buy Cheap xanax us pharmacy Now The Largest Internet Pharmacy. Pharmacy Store.
  • Buy Cheapest buy ambien online without prescription Now Best Prices. Online Prices For buy ambien online without prescription!
  • Buy Cheapest mens viagra Now Pharmacy Store. Top Online Pharmacy.
  • buy cialis in the uk Online Without Prescription Best Internet. Low Prices.
  • Buy Cheap discount online phentermine Online Pharmacy Store. Special Prices For discount online phentermine!
  • Buy Cheap canada codeine Now 24/Online Pharmacy. Guaranteed Shipping.
  • Buy Cheap phentermine with no perscription Online Cheap Prescription Drugs. Pharmacy Store.
  • Buy Cheap generika levitra Online Low Prices. Internet Prices For generika levitra!
  • Buy Cheapest norvasc mg Online Top Online Pharmacy. Pharmacy Store.
  • Buy Cheap cialis versus viagra Online Best Internet. Order Cheap Meds Without Rx.
  • Buy Cheap dosage of viagra Online Top Online Pharmacy Supplier. Best Prices.
  • Buy Cheap online valium no prescription Now Best Internet. The Largest Internet Pharmacy.
  • Buy Cheap nerve pain medication Now Low Prices. Cheap Meds Without Prescription.
  • Buy Cheapest drugs for bipolar disorder Online Best Drugstore. WorldWide Shipping.
  • Buy Cheapest panic disorder treatment Now No Prescription Needed. Best Internet.
  • Buy Cheapest viagra by post Now Best Internet. Cheap Pharmacy Online.
  • Buy Cheap viagra and alcohol Now Guaranteed Shipping. Cheap Pharmacy Online.
  • Buy Cheapest propecia lowest Online Best Drugstore. Online Medical Shop.
  • Buy Cheapest headache relief medications Online Pharmacy Store. No Prescription Needed.
  • Buy Cheap canadian online drug store Online Best Internet. Online Prices For canadian online drug store!
  • Buy Cheap levitra alpha blockers Now Best Internet. Discount Online Pharmacy.
  • Buy Cheap avodart prescription Online Free Viagra Pills! Top Online Pharmacy.
  • Buy Cheap female cialis Now Best Online. Order Cheap Meds Without Rx.
  • Buy Cheap cheap weight loss pill Online Order Cheap Meds Without Rx. Best Online.
  • Buy Cheapest no prscription cialis Online Free Viagra Pills! 24/Online Pharmacy.
  • Buy Cheap buying pain meds without a prescription Now Discount Online Pharmacy. Best Internet.
  • Buy Cheap vpxl penis enhancement pills Now Discount Pharmacy Online. Free Viagra Pills!
  • Buy Cheap zolpidem online mexico Now Low Prices. Discount Online Pharmacy Shopping.