SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: Backuping MySql

Hybrid View

  1. #1
    SitePoint Addict klisis's Avatar
    Join Date
    Sep 2000
    Posts
    219
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am quite new to mySQL.
    And I have a simple question.

    How might I backup my current database? or how might I restore it?

    Thanks.

  2. #2
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Start here:

    http://www.webmasterbase.com/article...id=228&pid=876

    Also, consider using phpMyAdmin to do this.

  3. #3
    SitePoint Addict klisis's Avatar
    Join Date
    Sep 2000
    Posts
    219
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Aye, thanks.

  4. #4
    SitePoint Enthusiast vsantola's Avatar
    Join Date
    Jan 2001
    Location
    Portugal
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi klisis!

    You can use mysqldump that is a utility program that comes with MySQL (in all plataforms: *nix, win, ...)...

    To backup a database just do:

    mysqldump db >> backup_file.sql

    where "db" is the database name that you whant to backup, and "backup_file.sql" is the file where you whant to keep your backup copy of your database.

    This will result in a text file with SQL commands to use with MySQL. To restore the database (if a server crash happens hope not) do this:

    mysql db << backup_file.sql

    If you are not root, you may be prompted for the database password, just type it and you're ready to go...

    Good luck
    <Edited by vsantola on 02-04-2001 at 11:00 AM>
    Valter Santos

    rooco is my creature (a mix of a bear with a kanguroo)... he is trained in perl, PHP and is getting a java certification right now

  5. #5
    SitePoint Addict klisis's Avatar
    Join Date
    Sep 2000
    Posts
    219
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks to Vsantola as well.


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
  •