Does mysqldump
dump index information too, so when a dump is loaded indexes are automatically created? From the documentation I can't see anything that concretely says it does. http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html. Thank you.
No, it does not export indexes. Indexes are rebuilt upon loading the mysqldump back into mysql.
Mysqldump is a command-line utility that is used to generate the logical backup of the MySQL database. It produces the SQL Statements that can be used to recreate the database objects and data. The command can also be used to generate the output in the XML, delimited text, or CSV format.
mysqldump is used to take logical backup of the database or multiple database. --single-transaction uses a consistent read and guarantees that data seen by mysqldump does not change.
The mysqldump tool is located in the root/bin directory of the MySQL installation directory.
Yes. It does. (Do one and you'll see it there).
It depends on what you mean by index information. If you dump the CREATE TABLE statement for each table then this will dump the information about which indexes exist on each table on which columns. It won't dump the contents of each index but this info will be re-created when you replay the INSERTS in the dump file.
If you don't dump the CREATE TABLE statements then it's possible you could lose this info if you re-import the dump file into a schema that doesn't have the indexes in place.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With