I did not understand what others were trying to say until I saw this question .
The fact is that you cannot access "mysql.exe" and put mysqldump
in it. "Mysqldump.exe" is another file, so you have to execute it from the command line of the OS transfer options to execute.
So, in DOS (on Windows, of course), suppose you are in the directory: "C: \ xampp \ mysql \ bin", you can call the following command:
mysqldump -u root -p test > test.sql
You can also call it so that you can explicitly see that you are executing the file:
.\mysqldump.exe -u root -p test > test.sql
If it can be more crystal clear, you will see this line in DOS:
c:\xampp\mysql\bin>.\mysqldump.exe -u root -p test > test.sql
Ps: in this code you will be asked to provide a password after it is executed. That is, indeed, the recommendation "mysqldump.exe" provides if you put the password directly in the dump line.
Ps 2: if you use the default settings for the root user (that is, with an empty password), you just need to press "Enter" when you are asked to provide a password.
Ps 3: "test.sql" will be created in the same directory "mysqldump.exe". In this example: "C: \ xampp \ mysql \ bin".
Rafael barros
source share