Taking backup's from MYSQL is really simple however its not like taking dump of database, here is the query where you can export the result and import into your second Databse
it should result me all the Indexes from Database
SELECT CONCAT (concat("ALTER TABLE ",trim(TABLE_NAME)),group_concat(IF(INDEX_NAME="PRIMARY", concat(" ADD PRIMARY KEY (`", column_name,"`)"),concat(" ADD INDEX `",INDEX_NAME,"` (`",column_name,"` ASC) "))),";") AS resultFROM information_schema.STATISTICS WHERE TABLE_SCHEMA='DB_Name'GROUP BY TABLE_NAME;