I want to dump my DB with a click on a button in my C#.Net App.
I thought about using
Process.Start(@"mysqldump", @"-u root -p mydb > dump.sql");
but this command opens a command prompt asking for the MySQL user password.
how can I avoid this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Instead of this command :
Try using this, passing the password in the command, so
mysqldumpdoesn’t ask for it :