database back-up(MYSQL)

Discussion in 'MySQL' started by Namuk, Jun 3, 2008.

  1. #1
    haii..

    i have a lot of database on my note book, but same like my computer has a problem and i need to format it... but my problem is i don't know how to backup my database... if i copy and paste the folder of database... it can't function after that... all my data will be lost...

    so, how i can backup my database, or what i should do to solve this problem...?


    please help.... thanks..:confused:
     
    Namuk, Jun 3, 2008 IP
  2. seasonying

    seasonying Peon

    Messages:
    59
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    you should copy this date and put it in other place deposited ,then format it .
     
    seasonying, Jun 4, 2008 IP
  3. Namuk

    Namuk Peon

    Messages:
    49
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks...

    i m already got it...
    i using mysql query browser....

    thanks....
     
    Namuk, Jun 4, 2008 IP
  4. xlcho

    xlcho Guest

    Messages:
    532
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #4
    mysqldump (http:// dev.mysql.com/doc/refman/5.0/en/mysqldump.html) ? This tool is designed exactly for backuping and transffering databases.
    Also, on some systems and server setttings, it is possible to just copy the 'mysql' folder into the new system and everything will still work. I've done this sooo many times on an old slackware 10.2, mysql 4.0.20 and never lost any data. But that depends on mysql and database configurations, so there is a risk of data loss
     
    xlcho, Jun 4, 2008 IP
  5. neuromante

    neuromante Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    mysqldump is a simple option, you could install phpmyadmin if you need a pretty web interface, if not, just mysqldum -u username -ppassword database_name > backup.sql
     
    neuromante, Jun 4, 2008 IP
  6. SharePro

    SharePro Active Member

    Messages:
    239
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    80
    Digital Goods:
    2
    #6
    mysqldump --opt -u root -p yourdatabasename > /var/www/desired-sqldump.sql

    Replace the "yourdatabasename" with your own, and run this command. A mysql dump called "desired-sqldump.sql" will be created in /var/www

    If you want to put the dump back after you format, you do this
    mysql yourdatabasename < desired-sqldump.sql
     
    SharePro, Jun 5, 2008 IP