Click here to Skip to main content
15,892,809 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi!

I am using this code in order to backup my mysql db uploaded in the server. I have an application in vb.net that backs up my database.

VB
Process.Start("C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqldump.exe", "-uusername -ppassword db -r""" & txtpath.Text & "\backup.sql""")


I always get an error that mysql cannot connect to localhost as stated by the command prompt.

Any help will be appreciated. God bless!
Posted
Comments
Maciej Los 16-Sep-13 8:18am    
Where MySQL server is installed? Local host ot server?

1 solution

You need a space between "-u" and the username.

NB there must NOT be a space between "-p" and the password (see your previous post)

If you still get the error then check the permissions for the user id that you are using ... see this reference http://dev.mysql.com/doc/mysql-enterprise-backup/3.5/en/mysqlbackup.privileges.html[^]
 
Share this answer
 
Comments
Maciej Los 16-Sep-13 16:17pm    
Hawk eye!
+5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900