1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How do I upload a 40 MB SQL dump file using phpmyadmin

Discussion in 'PHP' started by vihutuo, Aug 16, 2008.

  1. #1
    I have been mostly using MSSQL but now I am shifting to MySQl. The problem I am facing now is to upload a 40 MB SQL dump file onto my godaddy shared hosting account. They have phpadmin through which I can upload the files. But the max file limit is set to 2MB only. How have you guys been doing?

    Thanks for looking
     
    vihutuo, Aug 16, 2008 IP
  2. ruby90

    ruby90 Peon

    Messages:
    721
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You can contact hosting company after uploading it via ftp :)
     
    ruby90, Aug 16, 2008 IP
  3. rohan_shenoy

    rohan_shenoy Active Member

    Messages:
    441
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    60
    #3
    I have never tried it with phpMyAdmin, but what I think could be a solution:
    1. Using phpMyAdmin, export the database into a SQL file (Check the 'Save as file' checkbox while exporting the database.)
    2. Create a password protected directory on your server.
    3. Now upload a PHP file to the same directory and disable its execution time out. Load the SQL statements from the SQL file and let the PHP script execute as a query.
    4. Once the database is imported delete the SQL file!

    I have not tested this method, but I think this should work smoothly. Do let me know if youa re able to do it this way.
     
    rohan_shenoy, Aug 16, 2008 IP
  4. ravianz

    ravianz Notable Member

    Messages:
    1,536
    Likes Received:
    55
    Best Answers:
    0
    Trophy Points:
    250
    #4
    as issue is about file size and limitation, you will have to contact your hosting provider for the solution! may be you have to pay some extra amount to resolve the space issue
     
    ravianz, Aug 16, 2008 IP
  5. rob_v

    rob_v Peon

    Messages:
    72
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Or you can use an client side app like SqlYOG - and load it that way.
    You establish a connection between the client and DB - then just load the file - it processes it on your local box and applies it to the database. Ive been able to load dumps over 2gig that way with no problems.
    You just may need to make sure you can access the db from outside - I know a lot of hosting companies lock it down to only allow localhost.
     
    rob_v, Aug 16, 2008 IP
  6. ryandanielt

    ryandanielt Well-Known Member

    Messages:
    1,797
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    185
    #6
    Or you can just cut the file into 2MB sections.
     
    ryandanielt, Aug 16, 2008 IP
  7. Joseph S

    Joseph S Well-Known Member

    Messages:
    1,373
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    155
    #7
    Or you can contact me and I'll do it in 5 minutes. :)
    I never ever use phpmyadmin for large files.
     
    Joseph S, Aug 16, 2008 IP
  8. CarcaBot

    CarcaBot Active Member

    Messages:
    389
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    58
    #8
    u can use this tool :
    http://www.ozerov.de/bigdump.zip
    Code (markup):
    is very good and easy to use :)
    it will upload large databases , u first need to upload ur database to the ftp host and then that tool and setup in it database details and then runn tool from browser ! And in few - sec , minutes will be redy !
     
    CarcaBot, Aug 16, 2008 IP
  9. pluswebdev

    pluswebdev Banned

    Messages:
    205
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #9
    My suggestion is also Bigdump
    The homepage of Bigdump is http://www.ozerov.de/bigdump.php

     
    pluswebdev, Aug 17, 2008 IP
  10. vihutuo

    vihutuo Well-Known Member

    Messages:
    1,511
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    180
    #10
    Thank you for all the suggestion guys. I am checking out bigdump . Hope It gets the work done
     
    vihutuo, Aug 17, 2008 IP
  11. antpeks

    antpeks Well-Known Member

    Messages:
    394
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    130
    #11
    bigdump gets the job done, did a while ago a database of joy-scape.com that was 4.3 GB in size, no problem at all for a 40 MB sql file.

    Peter
     
    antpeks, Aug 17, 2008 IP
  12. Michelle Michan

    Michelle Michan Banned

    Messages:
    400
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #12
    My friends use bigdump even for importing small databases, that thingy is easier and faster that get into your phpMyAdmin and all the other stuff so I'm with those who pointed at bigdump tough I personally haven't used it on my sites... my friends helping to do this job :)
     
    Michelle Michan, Aug 17, 2008 IP
  13. nice.wallpapers

    nice.wallpapers Active Member

    Messages:
    142
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    60
    #13
    Hi ,

    It is as easy as you can say :) ... upload file in a folder then write a php script to read that file in a variable .... after that run mysql_query($variable);

    every thing in that file will go to database ;)

    Thanks :)
     
    nice.wallpapers, Aug 17, 2008 IP
  14. HBZSoftware.com

    HBZSoftware.com Peon

    Messages:
    88
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #14
    The easiest way is to ask GoDaddy to do it for you - in my experience with them, they will handle requests like this.
     
    HBZSoftware.com, Aug 17, 2008 IP
  15. vihutuo

    vihutuo Well-Known Member

    Messages:
    1,511
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    180
    #15
    My experiment with bigdump did not work . Gave me the following error

    PHP version 4.1.0 is required for BigDump to proceed. You have PHP 4.3.11 installed. Sorry!

    Got to try some other way. Maybe try to write a script
     
    vihutuo, Aug 18, 2008 IP
  16. itrana123

    itrana123 Peon

    Messages:
    177
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #16
    Thanks for sharing vihutuo. Nice script and i have used it a lot of times.
     
    itrana123, Mar 26, 2009 IP
  17. axa

    axa Active Member

    Messages:
    915
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    60
    #17
    just search file php.ini and change the value of this parameter :

    upload_max_filesize


    also dont forget to adjust max execution time:

    max_execution_time
     
    axa, Sep 13, 2009 IP