how to restore big database to mysql?

Discussion in 'MySQL' started by eyeglassesadvisor, May 8, 2009.

  1. #1
    My mysql database is too big, can not restore to my database, how to do?
     
    eyeglassesadvisor, May 8, 2009 IP
  2. freelistfool

    freelistfool Peon

    Messages:
    1,801
    Likes Received:
    101
    Best Answers:
    0
    Trophy Points:
    0
    #2
    What error are you getting?
     
    freelistfool, May 9, 2009 IP
  3. RackSolidHost

    RackSolidHost Peon

    Messages:
    65
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    try restoring it through ssh:

    mysql -u username -ppassword new_db_name < backup_file.sql
     
    RackSolidHost, May 9, 2009 IP
  4. leeza

    leeza Peon

    Messages:
    205
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #4
    leeza, May 9, 2009 IP
  5. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #5
    What happens when you restore database? How you are doing it?
     
    mwasif, May 10, 2009 IP
  6. hydra777

    hydra777 Peon

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Try to open the sql file with notepad, select all and copy then on you myphpadmin, open query and paste the code there. It will take some time especially if you're dealing with very huge data. If that causes an error, try using third party like sqlyog, you only need to supply the host, user and password. Use port 3306(if I'm not mistaken) as default.
     
    hydra777, May 10, 2009 IP
  7. Ignacio21

    Ignacio21 Guest

    Messages:
    61
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #7
    You can do an upload of a big database in seconds, using putty.

    Download putty here: http://www.chiark.greenend.org.uk/~s.../download.html

    Install putty. Login with the IP of your host, your root user and password.

    Upload the database you want to import in a sql file to your server using an ftp client like smartftp, cuteftp... etc

    Once in the command window, type this, copy and paste:

    mysql -u yourmysqlusername -p mysqldatabasename < /path/to/your/file.sql

    replace yourmysqlusername with the username for MySQL

    replace mysqldatabasename with the actual name of the database

    replace /path/to/your/file.sql with the location and name of the database you have uploaded in a sql file to your server using ftp and the one which will be imported to the actual database

    Tell me if you need more help.
     
    Ignacio21, May 10, 2009 IP
  8. RadioBounce

    RadioBounce Banned

    Messages:
    4,171
    Likes Received:
    16
    Best Answers:
    1
    Trophy Points:
    0
    #8
    Interesting question, I always wondered how I would do this if my hosting providers 99.9% uptime failed me again and I had to restore my backup on a new hosting service because this time they didn't pay their reseller fees and they got banned and I bought 2 years hosting but instead got 3 months.

    Oh I went slightly of topic. :eek:
     
    RadioBounce, May 10, 2009 IP
  9. RadioBounce

    RadioBounce Banned

    Messages:
    4,171
    Likes Received:
    16
    Best Answers:
    1
    Trophy Points:
    0
    #9

    He's probably uploading a backup or a database that he bought or something similar. :)
     
    RadioBounce, May 10, 2009 IP
  10. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #10
    ssh is the best way for you
     
    Bohra, May 10, 2009 IP
  11. T.Guru

    T.Guru Peon

    Messages:
    78
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Maybe reducing the size of the database would be a solution. Going through ssh is a good solution also.
     
    T.Guru, May 12, 2009 IP
  12. sunnyverma1984

    sunnyverma1984 Well-Known Member

    Messages:
    342
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    120
    #12
    sunnyverma1984, May 13, 2009 IP
  13. iam.xavier

    iam.xavier Well-Known Member

    Messages:
    521
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    125
    #13
    Try BIGDUMP
    it will import All Size of DB

    .zip and SQL formats only

    Thanks,
    -XAK
     
    iam.xavier, May 16, 2009 IP
  14. reuben0207

    reuben0207 Peon

    Messages:
    243
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #14
    sorry to hijack here.....i'm having prob on my wordpress db.....i've backup the said db, have moved to new server. now i want to upload the db to new server, how should i do it? while using the import tool at myphpadmin, after a while an error message prompted:
    MySQL said: Documentation
    #1044 - Access denied for user 'reuben@'localhost' to database 'reuben_wrdp2'


    pls advise...tq
     
    reuben0207, May 17, 2009 IP
  15. Webcoders

    Webcoders Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #15
    Bigdump is the way to go. Works every time, i have imported alot for big sql DB's this way. Reuben - Access denied for user sounds to me like a user info problem.. how big is your sql dump?
     
    Webcoders, May 17, 2009 IP
  16. reuben0207

    reuben0207 Peon

    Messages:
    243
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #16
    me files wasn't big, i suspect the configuration prob since i was moving from another server...maybe u can show some guide...
     
    reuben0207, May 18, 2009 IP
  17. GMC

    GMC Member

    Messages:
    99
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    45
    #17
    http://www.mysqldumper.de/en/

    This script saved me over the weekend - very user friendly and has a progress bar - something PHPmyadmin lacks
     
    GMC, May 19, 2009 IP