How i can import a sql

Discussion in 'MySQL' started by bebe123, Mar 17, 2008.

  1. #1
    i have a 44mb data base i try to import in phpadmin but i have a problem,
    Here is the Error
    Maximum execution time of 300 seconds exceeded in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/import/sql.php on line 118


    Probably is a huge database 44mb ?
    Anyone can help me
     
    bebe123, Mar 17, 2008 IP
  2. ironmankho

    ironmankho Active Member

    Messages:
    393
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #2
    Fortunately I’ve discovered a very simple tool called BigDump. This little PHP script allows for arbitrary-sized sql files to be imported in the MySql database with no headaches. It’s pretty simple to configure, files can be uploaded via ftp and it’ll show them in a list for easy restore. It supports both text (*.sql) and compressed (*.gz) files.

    http://www.ozerov.de/bigdump.php
     
    ironmankho, Mar 17, 2008 IP
  3. RNK Concepts

    RNK Concepts Peon

    Messages:
    74
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    phpmyadmin can also read zipped files ... this could help with the amount of the upload ... also, it is often necessary when dealing with anything PHP related to change the allowed upload file size above the standard 2MB. You can do this in your php.ini file normally found in your etc/ directory on your server. Proceed with caution however, because any wrong settings here can cause serious issues.
     
    RNK Concepts, Mar 17, 2008 IP
  4. kmap

    kmap Well-Known Member

    Messages:
    2,215
    Likes Received:
    29
    Best Answers:
    2
    Trophy Points:
    135
    #4
    try to upload zip

    if it does not help you will need to slice the db sql into many files.

    Regards

    Alex
     
    kmap, Mar 18, 2008 IP
  5. LittleJonSupportSite

    LittleJonSupportSite Peon

    Messages:
    386
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    0
    #5

    You could FTP the file in then SSH inand import from the command line:

    
    mysql -uusername  -p database < your.sql
    
    Code (markup):
    If you do not have SSH Access you could FTP the file in and then write a PHP script that uses the system() function to call to the command line and run that as well.
     
    LittleJonSupportSite, Mar 18, 2008 IP
  6. TheBiaatch

    TheBiaatch Peon

    Messages:
    435
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I would definately use the bigdump method described above, done it in the past for 700MB+ SQL files. You can also change the maximum execution time, otherwise you would have to login into sheel as root and edit your php.ini file to max execution time unlimited (I believe its 0 then)
     
    TheBiaatch, Mar 18, 2008 IP
  7. worldpresident

    worldpresident Banned

    Messages:
    163
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #7
    copy the DB to server and if u have access to mysql prompter type this command :

    mysql -uusername -p database < your.sql
     
    worldpresident, Mar 18, 2008 IP
  8. teamtgb

    teamtgb Banned

    Messages:
    400
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Hey, use BigDump. it i very easy and fast. If you need help i can help you out.
     
    teamtgb, Mar 18, 2008 IP
  9. chapicha

    chapicha Peon

    Messages:
    235
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I vote to Bigdump too.
     
    chapicha, Mar 20, 2008 IP