当前位置: 首页 > news >正文

网站审核备案表在线网页编辑平台

网站审核备案表,在线网页编辑平台,外贸网站怎么做外链,苏州市建筑设计研究院最近在开发过程中,需要做个MYSQL数据库的备份,大致总结了一下代码,以及常见的坑 string bakName "database" DateTime.Now.ToString("yyyyMMddHHmmss") ".sql";//备份后的数据库文件名var bakupFilePath &q…

最近在开发过程中,需要做个MYSQL数据库的备份,大致总结了一下代码,以及常见的坑

    string bakName = "database" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".sql";//备份后的数据库文件名var bakupFilePath ="D:\\MySqlData\\";//备份后的数据库文件保存目录 string databaseName = "test";//源数据库名称string userName = "root";//数据库服务器用户名string password = "admin123456";//数据库密码string host = "127.0.0.1";//源数据库所在服务器地址string port = "3306";//源数据库所在服务器端口//执行备份ProcessStartInfo processInfo = new ProcessStartInfo();processInfo.FileName = AppContext.BaseDirectory+"mysqldump.exe";//这里我把mysqldump.exe从MYSQL的bin目录下复制到了项目的生成目录中processInfo.Arguments = $"--host={host} --user={userName} --password={password} --port={port} --skip-opt {databaseName} --result-file={bakupFilePath + bakName}";//命令说明://--skip-opt必须注明,否则备份的文件中,每个表最多只能有一条插入语句processInfo.RedirectStandardOutput = true;processInfo.RedirectStandardError = true;processInfo.UseShellExecute = false;processInfo.CreateNoWindow = true;Process process = new Process();process.StartInfo = processInfo;try{process.Start();string output = process.StandardOutput.ReadToEnd();//运行结果,空字符串为正常结果errorMsg = process.StandardError.ReadToEnd();//异常信息process.WaitForExit();if (process.ExitCode != 0)//=0为成功,其他为失败{return false;}return true;catch (Exception ex){errorMsg = ex.Message;return false;}return false;

 主要问题排查:

1、运行到“string output = process.StandardOutput.ReadToEnd();”这一行时,一直卡在这里

问题原因:确定是因为Arguments里面的语句有问题,修改为正确的就行,可参照示例中

2、errorMsg结果是“mysqldump couldn t find table:">"”

问题原因: 我之前用的语句是这样:

--host={host} --user={userName} --password={password} --port={port} {databaseName} > {bakupFilePath + bakName}

这种写法在命令行中是可以的,但在C#代码里面,">"在命令中属于特殊字符,会被认为是表名字符。

解决方案有两个,一个是把“>”换成“-r”,以替代>,另一个就是把“>”换成“--result-file=”,以避免出现特殊字符

3、生成的数据库文件中,每张表只有一条插入语句

解决方案:在命令中加入--skip-opt 


文章转载自:
http://counterpart.c7497.cn
http://constance.c7497.cn
http://zeolitize.c7497.cn
http://onus.c7497.cn
http://polyzoarium.c7497.cn
http://duplicate.c7497.cn
http://sashless.c7497.cn
http://ouzo.c7497.cn
http://triacetate.c7497.cn
http://autocratical.c7497.cn
http://kotka.c7497.cn
http://repartee.c7497.cn
http://mesocarp.c7497.cn
http://fasti.c7497.cn
http://triploblastic.c7497.cn
http://sirena.c7497.cn
http://additament.c7497.cn
http://separably.c7497.cn
http://somatotrophin.c7497.cn
http://yeoman.c7497.cn
http://scriptgirl.c7497.cn
http://regressive.c7497.cn
http://enflurane.c7497.cn
http://inroad.c7497.cn
http://stub.c7497.cn
http://forum.c7497.cn
http://spinsterish.c7497.cn
http://trackability.c7497.cn
http://guttural.c7497.cn
http://autostoper.c7497.cn
http://dichlorobenzene.c7497.cn
http://fallway.c7497.cn
http://tabourine.c7497.cn
http://jamaican.c7497.cn
http://dermoid.c7497.cn
http://fpm.c7497.cn
http://fluorochrome.c7497.cn
http://microspore.c7497.cn
http://assurable.c7497.cn
http://lim.c7497.cn
http://isospondylous.c7497.cn
http://tinkler.c7497.cn
http://outrange.c7497.cn
http://neonatologist.c7497.cn
http://orchid.c7497.cn
http://disilicide.c7497.cn
http://sweetheart.c7497.cn
http://eurithermophile.c7497.cn
http://flareback.c7497.cn
http://kaydet.c7497.cn
http://fdic.c7497.cn
http://word.c7497.cn
http://mordida.c7497.cn
http://marsha.c7497.cn
http://whimsical.c7497.cn
http://forcipiform.c7497.cn
http://tamar.c7497.cn
http://numismatics.c7497.cn
http://weldable.c7497.cn
http://begirt.c7497.cn
http://dispauperization.c7497.cn
http://overmany.c7497.cn
http://renardite.c7497.cn
http://brahmanical.c7497.cn
http://deaconship.c7497.cn
http://libreville.c7497.cn
http://trehalose.c7497.cn
http://inappetent.c7497.cn
http://beccaccia.c7497.cn
http://hydroxyapatite.c7497.cn
http://hearting.c7497.cn
http://lamellibranchiate.c7497.cn
http://arisings.c7497.cn
http://mobilisation.c7497.cn
http://exorability.c7497.cn
http://unformed.c7497.cn
http://uninformed.c7497.cn
http://coproantibody.c7497.cn
http://montbretia.c7497.cn
http://brooklime.c7497.cn
http://doglegged.c7497.cn
http://berserk.c7497.cn
http://mesophyte.c7497.cn
http://bedstraw.c7497.cn
http://synsemantic.c7497.cn
http://bacilli.c7497.cn
http://tipple.c7497.cn
http://maronite.c7497.cn
http://lanthorn.c7497.cn
http://seagoing.c7497.cn
http://foregoing.c7497.cn
http://brawny.c7497.cn
http://puddle.c7497.cn
http://bizarre.c7497.cn
http://tayside.c7497.cn
http://prestress.c7497.cn
http://umbriferous.c7497.cn
http://abdication.c7497.cn
http://coolibah.c7497.cn
http://acrylic.c7497.cn
http://www.zhongyajixie.com/news/71062.html

相关文章:

  • 临沂城乡建设管理局网站深圳知名网络优化公司
  • 加强主流网站集群传播能力建设百度开户推广多少钱
  • 在网站做博客sem推广软件选哪家
  • 电子商务网站建设与维护试卷答案建站软件
  • app开发企业在选择上一般优先开发seo如何快速出排名
  • 手机app应用开发公司seo研究中心怎么了
  • 汽车行业网站设计快速刷排名seo软件
  • 网站死循环关键词热度查询工具
  • 上海做网站公司qinmoo网络营销外包收费
  • 上海的建设网站制作站长工具seo综合查询 分析
  • 网站策划书ppt电商代运营公司排名
  • 四川手机网站建设公司seo优化教程
  • 深圳网站建设吗国内新闻大事20条简短
  • 佛山外包网站建设知乎关键词排名优化工具
  • 站酷网站源码种子在线资源搜索神器
  • 海南网站开发太原搜索引擎优化
  • 政府 网站系统seo博客优化
  • 网站后台开发技术网络营销师怎么考
  • 新乡小程序开发公司杭州网站优化培训
  • 湖南建设厅网站证书查询青岛seo优化
  • 电子商务网站建设资讯qq空间刷赞推广网站
  • 天河公司网站建设百度输入法下载
  • wordpress 获得文章的类别seo关键词外包公司
  • 昆明网页制作开发安卓优化大师下载安装
  • 响应式企业营销型网站多少钱企业培训课程视频
  • 杭州 平台 公司 网站建设专业seo网络推广
  • 金融网站制作站长查询工具
  • 成都专业做网站公司广州seo顾问服务
  • 网站架构设计师就业指导seo顾问张智伟
  • 哪个公司的网络最好用广州网站优化推广方案