SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Jan 2002
    Posts
    131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Saving a MYSQL Database to another Comp???

    I have an online Database that I use for my site and forums but I want to save it and put it on my own comp for test purposes.

    How do I save that online database and insert it into my own?

  2. #2
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you have Telnet (or SSH) access then you should be able to download it through your connection. Alternately if you have FTP access and the location where the database files live shows up in your directory structure you can download it like that.

    Or, if you've got PHPmyAdmin, you can do a dump of the database which will give you a text file containing all the contents of the database.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  3. #3
    SitePoint Zealot
    Join Date
    Jan 2002
    Posts
    131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeh I was trying to DL it through phpMyAdmin but when I saved the output to a text file and tried to upload it to my comp it was giving an error.

  4. #4
    SitePoint Addict delpino's Avatar
    Join Date
    Nov 2001
    Location
    London
    Posts
    335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if you have shell access try this:

    generate a dump:

    mysqldump -u username -p --opt dbname > backupfile

    gzip it and upload it to the new server. on the new server do this:

    mysql -u loginname -p dbname < backupfile

    if you do not have ssh access ask your host to do it..
    http://www.antosch-and-lin.com - Language Learning

  5. #5
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Ciced
    Yeh I was trying to DL it through phpMyAdmin but when I saved the output to a text file and tried to upload it to my comp it was giving an error.
    You wouldn't "upload" it. Take the text file containing the structure and data and run it as a query. The file contains SQL code to generate all of the tables for the database.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes


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
  •