Mysql Backup结果为0 MB [英] Mysql Backup results to 0 MB
本文介绍了Mysql Backup结果为0 MB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
美好的一天!
我想问一下我的代码在备份我的mysql数据库时出了什么问题。这是我的代码:
Good day!
I would like to ask what's wrong with my code in backing up my mysql database. Here's my code:
Process.Start("C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqldump.exe", "-u username -p password db -r """ & txtpath.Text & "\backup.sql"" ")
每当我使用它时,我得到一个0 MB的备份文件。此外,命令提示符显示要求输入密码。当我在数据库中输入密码时,它表示出现了错误。
任何帮助将不胜感激!谢谢你和上帝保佑!
whenever I use it, I get a 0 MB backup file. Furthermore, the command prompt shows asking for a password. When I entered my password in the database, it stated that there has been an error.
Any help will be appreciated! Thank you and God bless!
推荐答案
因为你在-p
之后留下了一个空格你基本上是说数据库没有密码......但确实如此 - 这就是出现提示的原因。
然后尝试备份名为<$ c的数据库$ c>密码(或您的密码是什么)而不是您的实际db
- 因此是一个0字节的文件
Because you have left a space after the-p
you are essentially saying that the database does not have a password ... but it does - which is why the prompt then appears.
It then tries to backup a database calledpassword
(or whatever your password is) instead of your actualdb
- hence a 0 byte file
这篇关于Mysql Backup结果为0 MB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文