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.
RELATED: How to Export a CSV file from MySQL Command Line
- › Amazon Won’t Let You Buy Kindle or Print Magazines Anymore
- › Google’s Pixel Phones Have New Camera and Health Features
- › Kodi 20.1 Has Arrived: Here’s What’s New
- › This Anker Battery Is Under Recall for Fire Risk
- › How Is SSH Different From Telnet?
- › 8 Fixes for a Second Monitor Not Detected on Windows
Lowell Heddings