When dumping a db, I see that some folks use
mysqldump -u username -p -l enchilada_db > whole_enchilada.sql
while others use that "--opt" option:
mysqldump -u username -p --opt enchilada_db > whole_enchilada.sql
I see that --opt actually is a shortcut for the following options:
1. Not sure the purpose of --add-locks... What's the difference between that and -l (--lock-tables)?
2. What's the point of --create-options (aka --all)? I'm just going from one MySQL install to another. (v4.0 to v4.x on another machine).
3. The --quick option would seem to slow down the dump job, rather than speed it up... The docs say that using that option tells mysqldump to *not* use buffering, so if it shoots out text to stdout after each sql command, wouldn't that take *longer* than if we'd used buffering?
Also, what I'm really concerned most about is, do I dump the db named "mysql" along with the others? If so, then when I'm restoring that db into the mysql install on the other computer, I need to DROP that database first? (Hm. Does the --add-drop-table take care of this for me?)
Finally, is there a rule-of-thumb to give me an idea how large my mysqldump file is going to be? My db has a good amount of binary data in it.
So far, I'm putting my notes on using mysql here: http://www.simisen.com/jmg/mysql.html