I found the following code in a PHP MySQL book (Dummy Series) which is not clear to me which i quote below -
"mysqldump --user=accountname --password=password databasename>path/
What I feel as error in the above code is the "--" comment operator before "user" in the above line. I think '--" indicates a comment operator in SQL/MySQL? So doesn't the rest of the line gets discarded?
I am just trying to learn MYSQL and a novice.
And in some other books or here in the web I see this command line below-
mysqldump db -u USER -p > output_file.sql
In my class again the teacher taught this code-
mysqldump -u root -p database>file.sql ( I know this one is correct ,I am just confused with the above code)
I am confused as to which one is correct!! Are both the same?
Can you please provide me the difference between the first code and the above code lines please ??
Also,what does the "--" does in the above lines mean?
And putting "--" makes the rest of the line a comment,doesn't it?? So how does the rest of line gets executed!!??!!
Please,can someone explain to me clearly the difference between putting a "--" and "-"?
What does the "--" & "-" operators means in mysqldump??
Hope you all get me