SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot
    Join Date
    Aug 2000
    Posts
    184
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I need to make one final backup of my two mysql databases that I have. I am changing hosts effective January 31 and need to make a backup.

    How do I go about making a backup and downloading it? Also how do I then rebuild it into the new host that I will be with?

    I am sorry, but I am very incompetent when it comes to databases and stuff.
    "Over 2200 Free Webmaster Resources and Tools"
    Search through our continually updated directory of free webmaster resources.
    WebmasterLane.com

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Logon to your server through ssh or telnet

    then issue this command

    $> mysqldump -u username -p databasename > databasename.sql


    After that is complete there will be a file called datanasename.sql in the directory that you were in when you issued the command. Use ftp to get that file.

    On the new server upload that file to a directory of your choice, logon telnet or ssh again and navigate to that directory the nissue

    $> mysqladmin -u username -p CREATE newdbname
    $> mysql -u username -p newdbname < databasename.sql

    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  3. #3
    AdSpeed.com Son Nguyen's Avatar
    Join Date
    Aug 2000
    Location
    Silicon Valley
    Posts
    2,241
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you have a big backup file, you should use ftp under telnet, connection between 2 hosts will be very fast rather than downloading to your computer and upload it to the new host again.

    Also a note: the backup file of MySQL is ASCII file (simply a bunch of queries)
    - Son Nguyen
    AdSpeed.com - Ad Serving and Ad Management Made Easy

  4. #4
    SitePoint Zealot
    Join Date
    Aug 2000
    Posts
    184
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Does 15kb sound right for a tiny database? I have three tiny databases one for an ad rotator and 2 for forums which I have or am fooling around with. All are tiny.
    "Over 2200 Free Webmaster Resources and Tools"
    Search through our continually updated directory of free webmaster resources.
    WebmasterLane.com

  5. #5
    AdSpeed.com Son Nguyen's Avatar
    Join Date
    Aug 2000
    Location
    Silicon Valley
    Posts
    2,241
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So that doesn't matter if you use trans-host connection or not
    Mine is big so I have to find a good way to do that!
    - Son Nguyen
    AdSpeed.com - Ad Serving and Ad Management Made Easy


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
  •