

*!40000 ALTER TABLE `accounts_contacts` ENABLE KEYS */ *!40000 ALTER TABLE `accounts_contacts` DISABLE KEYS */ SET character_set_client = Dumping data for table `accounts_contacts`

KEY `idx_contid_del_accid` (`contact_id`,`deleted`,`account_id`) KEY `idx_account_contact` (`account_id`,`contact_id`), `deleted` tinyint(1) NOT NULL default '0', Table structure for table `accounts_contacts`ĭROP TABLE IF EXISTS `accounts_contacts` Following is a partial output of sugarcrm.sql, showing the dump information of accounts_contacts table:. The sugarcrm.sql will contain drop table, create table and insert command for all the tables in the sugarcrm database. # mysqldump -u root -p > dumpfilename.sql In this article, let us review several practical examples on how to use mysqldump to backup and restore.įor the impatient, here is the quick snippet of how backup and restore MySQL database using mysqldump: backup: # mysqldump -u root -p > dumpfilename.sql Using mysqldump, you can backup a local database and restore it on a remote database at the same time, using a single command. For MyISAM, use mysqlhotcopy method that we explained earlier, as it is faster for MyISAM tables. To restore the database, execute the *.sql file on destination database. It creates a *.sql file with DROP table, CREATE table and INSERT into sql-statements of the source database. Mysqldump is an effective tool to backup MySQL database.
