SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Wizard geiger's Avatar
    Join Date
    Jul 2001
    Posts
    2,459
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Command to Duplicate DB?

    Is there a simple command to duplicate a database as another name? I tried downloading my 25MB forums and uploading. It was sent to the server fine, but took more than 300 seconds to process and timed out. My host said to use SSH, but I never have before. Any help would be appreciated. Thanks.

  2. #2
    SitePoint Guru dragonhawk's Avatar
    Join Date
    Apr 2002
    Location
    Melbourne
    Posts
    707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To backup the database in SSH

    mysqldump -lv -uUSERNAME -pPASSWORD DBNAME > FILENAME.sql

    Remember to change everything in capitals to what gives you access to your database.

    Once that is done, you will see a FILENAME.sql in the directory where you ran the command.

    To import, run this:

    mysql -uUSERNAME -pPASSWORD DBNAME < FILENAME.sql

  3. #3
    SitePoint Wizard geiger's Avatar
    Join Date
    Jul 2001
    Posts
    2,459
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks. How do I connect via SSH to the server? Never done it before. Do I need special permissions? What program?

  4. #4
    SitePoint Guru dragonhawk's Avatar
    Join Date
    Apr 2002
    Location
    Melbourne
    Posts
    707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can download Putty to connect to SSH. Just search for Putty in Google to find some place to download it from

  5. #5
    SitePoint Wizard Dean C's Avatar
    Join Date
    Mar 2003
    Location
    England, UK
    Posts
    2,906
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's a link to Putty's website for you :

    http://www.chiark.greenend.org.uk/~sgtatham/putty/


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
  •