Hi all!

I'm trying to perform a mysql database from vb.net. I use this code:

 Process.Start("C:\Program Files (x86)\MySQL\MySQL Workbench CE 5.2.44\mysqldump.exe", "--user=root --password=mypassword " _
                      & "--host= --databases MySQL databasename -r ""C:\GreatestHR Backup\BackUpDataBase.sql""")

When this code runs, a command prompt window opens and goes away immediately that i can't even read what it says. When I go to the output folder specified in the code, there is really BackupDatabase.sql but with only 0Kb, while the actual database has data in it. What could be the problem?

I repeat, I use mysql database in Mysql Workbenc 5.2.

F1 please.

4 Years
Discussion Span
Last Post by savedlema

First step is to see what the console output says; open up a command window and run it manually.


Thanks gusano. I did what you said and I was able to see this error msg:

"mysqldump:Got error:2005: Unknown MYSQL Server host ''--databases MySQL databasename -r ""C:\GreatestHR Backup\BackUpDataBase.sql"""

But, the mysql server is really there and working, I can fetch and send data to it with my application. This problem happens only with this backup thing.

  • I tried to use "localhost" instead of but same problem. I also tried to remove 'password' and add a port number, same problem.

Any advice?


Hm. localhost is the same as so I'd expect the same result. If it couldn't connect to your server (for example if it was off), you'd get a different error... Hmmmmmm.

I was able to get a similar command to run for my local MySQL over here...

Unknown MYSQL Server host ''--databases

Notice that there is no space between the host name and --databases in the error as reported; are there appropriate spaces in your manual command line?

Votes + Comments
thanks. please check my reply.

Thanks gusano, though sorry I couldn't get you so well. But, I tried to remove all unwanted spaces.
But now I get a different error message:

"Mysqldump: Got error:1044:Access denied for user ''@'localhost' to database ',' when selecting the database. (this is exactly how the error msg says, I didn't remove a thing in the '')

My code for now is:

 "C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqldump.exe", "--user=root --password =mypassword" "--host =localhost --port=3301 --databases MySQL databasename -r ""C:\GreatestHR Backup\BackUpDataBase.sql"""

Please, I would appreciate more help on this.


Solved it.

Good news! For anyone who runs across this thread later (and my own curiosity), what was the final issue?


Hi Gusano!
The trick was to remove all the "" in the second part of the command, and end up with something like this:

"C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqldump.exe", --user=root --password =mypassword --host =localhost --port=3301 --databases MySQL databasename -r "C:\GreatestHR Backup\BackUpDataBase.sql"

I have no explanations for that.
Thanks for offering to help.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.