MySQL + SQL · Lesson 104
mysqldump Backup Command
What is mysqldump?
mysqldump is a command-line tool that exports a database (or table) into a single .sql file you can back up or move to another server.
Common Commands
# whole database
mysqldump -u root -p school > school.sql
# one table only
mysqldump -u root -p school students > students.sql
# all databases
mysqldump -u root -p --all-databases > all.sql
Summary
- mysqldump exports databases/tables to .sql files.
- Use it for backups and moving data between servers.
💻 Live Code Editor
Is page ki language (MYSQL) mein code likhein aur turant chalाएं — yahीं, bina kuch install kiye.Powered by OneCompiler. Agar editor na khule to yahान naye tab mein kholein.
💻 Live Code Editor
Is page ke program yahan ready hain — chalाएं, badlें aur seekhें. Bina kuch install kiye.
Powered by OneCompiler. Editor mein code apne aap aa jata hai — Run dabaakर output dekhें.
Agar load na ho to naye tab mein kholें.