Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Page 1 of 2 12 LastLast
Results 1 to 15 of 19

This is a discussion on Downloading Huge Database in the Shared & Semi-Dedicated forum
I have a big database and I want to download it to my local computer.. .. i have tried downloading it using phpmysql, ,however, I ...

  1. #1
    JPC Member
    Join Date
    Apr 2004
    Posts
    39

    Downloading Huge Database

    I have a big database and I want to download it to my local computer.. .. i have tried downloading it using phpmysql, ,however, I think the database is too big or something because it wont download from my cpanel...

    anyways, I went ahead and read alittle bit about putty and how it works, downloaded it and run it..

    logged in and i think is working... I got the following:

    -jailshell-2.05b$

    however, I dont know what to do now..

    can someoen help me?

  2. #2
    Loyal Client the_ancient's Avatar
    Join Date
    Feb 2004
    Posts
    3,386
    have you had shell access enabled?

    I dont use shell so I cant help you more than that...

    there are Mysql Tools though that will allow you to do that with out shell as well, I personally use Navicat but it is a Pay for use product there are free ones out there, less advanced, but will do basic backups with no problems

  3. #3
    Voltron wannabe tank's Avatar
    Join Date
    Apr 2004
    Location
    Houston
    Posts
    306
    yes he has shell, that is wha the prompt is.

    at that prompt enter in:
    mysqldump --opt -p DBpasswordHere -u DBusernameHere -B DatabaseNameHere > database.sql

    That will dump the database to a file called database.sql and put it in your root directory. you can then download it via your FTP client.

    do some searche on mysqldump and you'll find plenty of infor about it.

  4. #4
    JPC Member
    Join Date
    Apr 2004
    Posts
    39
    thank you tank

  5. #5
    JPC Member
    Join Date
    Apr 2004
    Posts
    39
    Like this:

    mysqldump --opt -p DBmydbpassword? -u DBmydbusername? -B databasename? > database.sql ?

    or like this:

    mysqldump --opt -p mydbpassword? -u mydbusername? -B databasename? > database.sql ?

    and which passwords should I use? the database passwords? or the cpanel password?

  6. #6
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    Use the second, although I'm pretty sure that you can't have spaces between the -u and -p (I may be wrong, but I know it works fine without them in there). Also, use the database username and password.

    I've always used something like this:

    mysqldump -ucpanelname_dbusername -pdbpassword cpanelname_dbname > dumpfile.sql

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  7. #7
    JPC Member
    Join Date
    Apr 2004
    Posts
    39
    Awesome got it working thanks jason. I will bookmark this thread now

  8. #8
    Voltron wannabe tank's Avatar
    Join Date
    Apr 2004
    Location
    Houston
    Posts
    306
    Yes without the spaces is the standard. I must have gotten spacebar happy. But I believe it will work regardless.

  9. #9
    JPC Member
    Join Date
    Apr 2004
    Posts
    39
    Ok, now that I downloaded my database using putty, how would I go about uploading it?? what would be the command? thanks in advance.

  10. #10
    JPC Member
    Join Date
    Apr 2004
    Posts
    39
    Quote Originally Posted by Polo
    Ok, now that I downloaded my database using putty, how would I go about uploading it?? what would be the command? thanks in advance.
    anyone?

  11. #11
    Ron
    Ron is offline
    Loyal Client
    Join Date
    Aug 2002
    Posts
    7,306
    (You're asking in a 14 month old thread....)

    If by uploading it, you mean loading a sql dump file into the MySQL database, you need to ensure that the database is persent but all the tables are dropped, or that there are drop table commands in the sql file you previously created. DROPPING A TABLE IN MySQL DESTROYS ALL DATA ON THE TABLE. Please be sure of what you want to do before you do it.

    If so, here is the command, I think:
    Code:
    mysql -h 127.0.0.1 -uusername -p < dumpfile.sql
    You'll be prompted for your password.

    If you mean how to upload the sql file to the server, I can't help you.
    Last edited by Ron; 05-08-2006 at 07:05 PM.

  12. #12
    JPC Member
    Join Date
    Apr 2004
    Posts
    39
    If so, here is the command, I think:
    can someone confirm this?

  13. #13
    Ron
    Ron is offline
    Loyal Client
    Join Date
    Aug 2002
    Posts
    7,306
    ummm, did you try it?

  14. #14
    JPC Member
    Join Date
    Apr 2004
    Posts
    39
    Quote Originally Posted by Ron
    ummm, did you try it?
    no... what if that is not it, and I mess up something?? I'm not an expert with putty, so if I mess up something I wouldnt know how to fix it....

    that is why I want to make sure that is correct....

  15. #15
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    It looks correct to me. If it isn't you'll most likely end up with an error message, not a changed database. Ron knows his stuff. If he was worried that something he suggested could be problematic for you, he'd have told you (as he did in regard to DROPing tables).

    The thing to remember is that the regulars around here that answer most peoples questions are just regualr hosting clients. I personally, and I'm sure I speak for others as well, stop in to read the boards a few times a day, when I have a few minutes to spare. When I provide advice, it is usually with the caveat that it hasn't been tested. I usually don't ahve the time to, for example, create a database with dummy database, dump it, and try to restore it. Instead I give an explanation that is as accurate as my memory of doing it before allows. Occasionally you might get an error message or two and have to do some figuring out on your own, but its that figure thing out that helps you learn and remember how to do it by yourself next time.

    I don't mean for this to sound harsh. I just want you to realize that there is a risk that comes with all free advice. When you ask for such advice, you have to be willing to accept the risks, too.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •