THE ISSUE
This is a simple question that has a verifiable answer somewhere, I just can't seem to find it. This is a "how stuff works" type question, as opposed to a "help me fix a bug". I'm trying to understand how mysqldump works.
WHAT I'VE TRIED ALREADY
I Googled how does mysqldump know what databases exist and where they are located?
to no avail. I also posted the same query on Stack Overflow, but did not find a clear answer.
The most useful link was repeated references to the manual here. Unfortunately, that article doesn't have a clear answer to how mysqldump works.
MY QUESTIONS
The following questions are actually multiple aspects of the same main question to gather the most complete understanding from various perspectives.
Why can't I run it from the MySQL console CLI, instead of the Windows command line?
If I add the path to mysqldump.exe to my Windows system path will I be able to run mysqldump from any path in my Windows command line, or are the other obstacles to consider?
I have multiple instances of mysqldump.exe installed on my system. Two in WAMP and 2 in a standalone Apache 2.4 install. How can I know which version of mysqldump is being called when I type 'mysqldump' at the command prompt -- especially if the Windows PATH environment variable has the path to two different installs of mysqldump.exe? Is there a
msyqldump which
or something similar?When I run mysqldump at the Windows command prompt, since it is not run within the MySQL console, how does the program know what the list of available databases are?