[HELP] Import database

Discussion in 'Masalah Teknik dan Keamanan' started by ndaroini, 4 Dec 2013.

Thread Status:
Not open for further replies.
  1. ndaroini

    ndaroini Beginner 1.0

    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Master sekalian, saya minta tolong dong?
    Saya kan mau import database. Ukuran database yang mau diimport sekitaran 6MB, pas menggunakan phpmyadmin, dia selalu gagal time out.
    Untuk import lewat cli bagaimana ya perintahnya?
     
  2. ndaroini

    ndaroini Beginner 1.0

    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Atau kalau tidak time out selalu dapat pesan seperti ini

    #1153 - Got a packet bigger than 'max_allowed_packet' bytes

    Padahal max file adalah sebesar 200MB

     
  3. arifptm

    arifptm Poster 2.0

    Messages:
    188
    Likes Received:
    14
    Trophy Points:
    18
    Ukuran 6MB sebenarnya kecil.
    Cobalah dengan koneksi yang lebih cepat, misal di warnet.
    atau untuk menaikkan waktu timeout tambahkan di php.ini
    jadi misalnya 3 menit

    max_execution_time = 180

    tambahkan juga kalo perlu

    upload_max_filesize = 32M

    BTW punya akses SSH gak? kalo ada tentu lebih mudah
     
    ndaroini likes this.
  4. pluto01

    pluto01 Hosting Guru Web Hosting

    Messages:
    3,649
    Likes Received:
    754
    Trophy Points:
    113
    Benar info Mas arifptm di atas dicoba naikan saja lg max uploadnya dan atau juga max timeoutnya dari php.ini

    Jika ada akses sshnya lebih gampang lg, upload database yg mau diimport lalu :
    mysql -u root -pPassword namadatabase <database.sql
     
    ndaroini likes this.
  5. vanquizhers

    vanquizhers Poster 2.0

    Messages:
    163
    Likes Received:
    18
    Trophy Points:
    18
    hmm... tadi pagi saya juga alami hal serupa. Padahal upload di localhost... :(
    Akhirnya daripada pusing, saya import database yang saya butuhin aja... :D
     
  6. JuraganWebHosting

    JuraganWebHosting Apprentice 1.0

    Messages:
    226
    Likes Received:
    13
    Trophy Points:
    18
    kalau misanya pakai import enggak bisa.. biasanya aku execute baris2 syntax sqlnya di phpmyadmin.. kalau kepanjangan, execute per bagian biasanya.. :)
     
    ndaroini likes this.
  7. mustafaramadhan

    mustafaramadhan Hosting Guru

    Messages:
    3,237
    Likes Received:
    857
    Trophy Points:
    113
    Datanya dalam bentuk .sql (text) atau .zip (compress).

    Jika .sql maka dicompress dulu dan baru diupload.
     
    ndaroini likes this.
  8. dhyhost

    dhyhost Hosting Guru Web Hosting

    Messages:
    3,925
    Likes Received:
    612
    Trophy Points:
    113
    di compress saja dulu jadi .sql.gz biasanya hanya dapat 200-500kb jika sqlnya 6m,
    kalau exspor import sesama cPanel bisa menggunakan backup wizard saja
     
    ndaroini likes this.
  9. ndaroini

    ndaroini Beginner 1.0

    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    1. saya punya akses ssh. kalau mau upload database, ditaruh dimana?
    2. kalau di kompres dalam bentuk .zip, dapet balasan seperti ini
    "You attempted to load file with unsupported compression (application/zip). Either support for it is not implemented or disabled by your configuration."
     
  10. dhyhost

    dhyhost Hosting Guru Web Hosting

    Messages:
    3,925
    Likes Received:
    612
    Trophy Points:
    113
    jika SSH di user cPanel (bukan root), saya biasa pakai cara ini

    1. upload file database.sql ke Home Direcotry (/home) ~> harus dalam bentuk .sql tidak boleh di compress
    2. lalu pakai command ini

    Code:
    mysql -p -u username_mysql database_name < file.sql
     
    ndaroini likes this.
Loading...
Thread Status:
Not open for further replies.

Share This Page

Loading...