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.

Perfect way of upload a large sql database

Discussion in 'Databases' started by sweta.singh.98, Aug 26, 2009.

  1. #1
    hi

    i have a database of 300mb and i want to upload it in mysql but don't know how . i have searched the perfect way to do this but not get any best way i don't know about ssh i got many articles to do it by ssh but not able to do this ..

    also i tried bigdump.php but its also not working ....can any buddy can explain it step by step how to do this ....or can give a perfect article regarding this ..

    Thanks ........
     
    sweta.singh.98, Aug 26, 2009 IP
  2. premiumscripts

    premiumscripts Peon

    Messages:
    1,062
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    0
    #2
    premiumscripts, Aug 27, 2009 IP
  3. RHS-Chris

    RHS-Chris Well-Known Member

    Messages:
    1,007
    Likes Received:
    35
    Best Answers:
    10
    Trophy Points:
    150
    #3
    First, create a database through your control panel. Give it a name, then give a user full access to it, with a password. Upload your database backup (.sql file) through ftp to your websites root, in most cases, you should be able to see the public_html folder, not be in it. Then, through ssh, navigate to the root of your account, then issue the following command, of course, replacing the variables with your own:

    mysql dbname < filename.sql -u user --password=pass
     
    RHS-Chris, Aug 27, 2009 IP
  4. remember123

    remember123 Peon

    Messages:
    620
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #4
    bigdump actually works..
    can you post the error that your are getting while restoring the db ?
     
    remember123, Aug 27, 2009 IP
  5. ditch182

    ditch182 Peon

    Messages:
    37
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I've had great success with BigDump. Are you getting an error message?
     
    ditch182, Aug 27, 2009 IP
  6. pornstarglobal

    pornstarglobal Greenhorn

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #6
    BigDump should work just fine -
     
    pornstarglobal, Aug 31, 2009 IP
  7. HivelocityDD

    HivelocityDD Peon

    Messages:
    179
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    If you have control panel access make use of phpmyadmin for importing the data.

    It is the easiest method :)
     
    HivelocityDD, Sep 1, 2009 IP
  8. sweta.singh.98

    sweta.singh.98 Guest

    Messages:
    628
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #8
    thanks for ur suggestions its works and i have done this .....
     
    sweta.singh.98, Sep 13, 2009 IP
  9. jkapadia1983

    jkapadia1983 Peon

    Messages:
    40
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    it is very simple......try phpmyadmin and import database...
     
    jkapadia1983, Sep 30, 2009 IP
  10. sweta.singh.98

    sweta.singh.98 Guest

    Messages:
    628
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #10
    yes u r right but in case of large data base it not works ..
     
    sweta.singh.98, Sep 30, 2009 IP
  11. w47w47

    w47w47 Peon

    Messages:
    255
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    bigdump works fine for me... maybe you just didn't configure it right ;)
     
    w47w47, Oct 2, 2009 IP
  12. w47w47

    w47w47 Peon

    Messages:
    255
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    hmm... on some hosting you can... you just have to submit the same file more times... and it just continues where it stopped. ;)
     
    w47w47, Oct 2, 2009 IP
  13. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #13
    Shell is the fastest and the best way for a large database
     
    Bohra, Oct 2, 2009 IP
  14. sweta.singh.98

    sweta.singh.98 Guest

    Messages:
    628
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #14
    yes Bohra u r right i have done it and hardly it takes 3-4 secs in uploading 300MB database . I was Shoked to see that .. :)
     
    sweta.singh.98, Oct 3, 2009 IP
  15. racklane

    racklane Peon

    Messages:
    98
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #15
    Thanks alot the above posts help alot.
     
    racklane, Oct 3, 2009 IP
  16. ServiceBlaster

    ServiceBlaster Peon

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #16
    By far the best way to do it is by using a mysql dumper.
     
    ServiceBlaster, Oct 3, 2009 IP
  17. sweta.singh.98

    sweta.singh.98 Guest

    Messages:
    628
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #17
    yes this is also helpfull....
     
    sweta.singh.98, Oct 23, 2009 IP
  18. neerajkumar

    neerajkumar Peon

    Messages:
    263
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #18
    Can someone tell me how to use SSH to upload the DB?I have never used SSH before
     
    neerajkumar, Nov 11, 2009 IP
  19. Dennis M.

    Dennis M. Active Member

    Messages:
    119
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #19
    This is also done within a shell.

    However, in response to the above question, you need to know where you are at. First type 'ls' (No quotes; assuming this is a Linux machine). In most cases you will see your root directory containing your public_html. By this time, you should have uploaded your database backup file to the server via FTP. Go to the directory where you uploaded that file using the 'cd' command. For example, the following will take me to my cgi-bin located within my public_html:

    cd ~/public_html/cgi_bin
    Code (markup):
    the ~ character just states that I want to start in MY root directory. But now that you have found the file type 'ls' again to be certain it's there. Found it? Great! Now we will use mysqldump. It should already be installed on your server - it's part of MySQL.

    mysqldump -u <DB_USER> --password=<DB_PASS> <DATABASE_NAME> <  <BACKUPFILE.SQL>
    Code (markup):
    And there is your code. Just replace the variables with appropriate information (make sure to remove the brackets) and your database should be quickly restored!

    A working example will look like this:

    mysqldump -u test --password=test123 test_database < test.sql
    Code (markup):
    Regards,
    Dennis M.
     
    Dennis M., Nov 11, 2009 IP
  20. theapparatus

    theapparatus Peon

    Messages:
    2,925
    Likes Received:
    119
    Best Answers:
    0
    Trophy Points:
    0
    #20
    300 megs through phpmyadmin? You're nuts. Especially considering most default php installs are set to 2 megs.

    Granted your own may be different but I run into that 2 meg limit quite often on support forums.
     
    theapparatus, Nov 11, 2009 IP