Hi all!

I have a big problem that I would like some help. I use Mysql Workbenc 5.2CE. I changed the default port to 3301. The mysql server is up and running well (I access it from an app I'm making with VB.NET). The problem is I can't get mysqldump to backup the database. I'm using the following code (in the command prompt)

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

(Note: I would like to use an IP Address for host)

When I run that, I get the error: "mysqldump: Got error: 2003: Can't connect to MySQL server on 'localhost' (10049)
when trying to connect ".

Can someone please help me on this? (People are not even talking about mysql's error 10049 online.)

I will appreciate any help.

4 Years
Discussion Span
Last Post by savedlema

10049 means address not available, it's a socket error. Port seems to be missing the equal sign, so check your syntax.

Votes + Comments
thanks. please check my reply.

Try connecting to --host=localhost if you're using sockets..

Votes + Comments
thanks. please check my reply.

Thank you all, but I haven't been able to solve the problem:
1. From dorco's suggestion: I followed the link and it says binding would be an issue only if I was connecting to another IP address, say a public IP or just any other. But, for my case, the server is on the same computer (localhost) so I presume the binding is set correctly.But thank you for the article, of course it will help me in the future since I'm going to do that.

2.Pritaes, thank you. I added the = to port but no success sir. I will post my code below.

3.Nickw, thank you. I did what you said (host=localhost) no success.

My code now looks 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"""

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 '')

Please, I will appreciate more help.


Try this:

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

Read more in the manual.

Edited by pritaeas


Pritaeas, I can't be more more thankful! It worked. I just see removing the "" made it work.

Thank you much, and thank you too for the link to the manual, I will study it.

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.