close

Backing up your database is a very important system administration task, and should generally be run from a cron job at scheduled intervals. We will use the mysqldump utility included with mysql to dump the contents of the database to a text file that can be easily re-imported.

Syntax:

mysqldump -h localhost -u root -pmypassword databasename > dumpfile.sql

Example:

mysqldump -h localhost -u root -p2Uad7as9 database01 > dumpfile.sql

This will give you a text file containing all the commands required to recreate the database.

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 里歐 的頭像
    里歐

    里歐's 布拉格

    里歐 發表在 痞客邦 留言(0) 人氣()