MySQL FAQs
FAQs Categories
Client Server Commands
Database Structure
Table Types or Storage Engines
Indexes
SQL Statements
Table Joins
Funtions and Operators
Tricky Select Queries
Speed Up Queries
Data Back Up
General Questions
Errors
N.M.P.L. Company www.NearMePayday.Loan || 3-month (90 days)
Powered by MySQL
 
Home / Data Back Up / Export Data / Question No: 81

How to take dump of the database?

I want to take dump of the my database alongwith its primary/foreign key constraints etc. How to take dump of the database in MySQL having such conditions?

Answer No: 81

MySQL provides mysqldump utility, which is simple to use. Go to command line and stay there at where MySQL is installed. As with me, I am using Windows and at my system MySQL is installed at C:\AppServ\MySQL. So you may do the following to take dump of the database using mysqldump utility:

1. C:\AppServ>MySQL>
2. Run mysqldump utility giving required options like mysqldump --password=password --user=user_name db_name > db_name_dump.sql

Take an example looks like below at command prompt:

C:\AppServ\MySQL>mysqldump --password=root --user=root test > test_dump.sql

Related MySQL FAQs to the Above FAQ

How-to-use-SELECT-INTO-OUTFILE-statement-to-export-data How to use SELECT INTO OUTFILE statement to export data?

How-to-export-table-data-to-text-file-with-SELECT-INTO-OUTFILE-statement How to export table data to text file with SELECT INTO OUTFILE statement?

How-to-export-table-data-to-Microsoft-Excel-with-SELECT-INTO-OUTFILE-statement How to export table data to Microsoft Excel with SELECT INTO OUTFILE statement?

How-to-use-mysqldump-to-export-data How to use mysqldump to export data?

How-to-take-dump-of-database-without-its-data How to take dump of database without its data?

About FAQs: Recently Added FAQs

About MySQL FAQs: Site Map | Bookmark Us | Recommend this Site to Your Friend | Contact Us

Useful Links: Wikipedia.org | Oracle.com | w3schools.com | www.php.net | Github.com

© 2021  www.mysqlfaqs.net
All rights reserved.