Backing up your database is a very important task of system administration and should be run at scheduled intervals, usually from a cron job. We will use the mysql dump utility with MySQL for the contents of the database into a text file to be imported easily dump.
mysqldump -h localhost -u root -pmypassword databasename > dumpfile.sql
This will give you a text file with all necessary commands to the database to rebuild.
mysqldump -h localhost -u root -p2Uad7as9 database01 > dumpfile.sql
No comments:
Post a Comment