如何通过在工作台中编写存储过程来在mysql中创建备份? [英] how to create back up in mysql by writing stored procedure in workbench?

查看:93
本文介绍了如何通过在工作台中编写存储过程来在mysql中创建备份?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过调用我的数据库的存储过程在Windows窗体应用程序的按钮上创建备份。但是如何编写这样的存储过程我不知道MySQL的情况,但我之前已经在MSSQL中完成了。

i want to create backup on the button click of windows form application by calling a stored procedure of my database. but how to write such stored procedure i don't know in case of MySQL but i have done it before in MSSQL.

推荐答案

在MySQL中编写存储过程.. < a href =http://forums.mysql.com/read.php?98,358569> http://forums.mysql.com/read.php?98,358569 [ ^ ]



有关备份部分,请参阅 Mysqldump 上的文档 - 可在此处找到示例http://www.ducea.com/2007/07/25/dumping-mysql-stored-procedures-functions-and-triggers/ [ ^ ]



就个人而言,我不会将备份处理放入数据库本身,但会有一个外部脚本实现相同的功能...这确实有助于您通过单击WinForms应用程序来创建备份。
Writing stored procedures in MySQL .. http://forums.mysql.com/read.php?98,358569[^]

For the backup part see documentation on Mysqldump - an example can be found here http://www.ducea.com/2007/07/25/dumping-mysql-stored-procedures-functions-and-triggers/[^]

Personally I wouldn't put the backup processing into the database itself, but would have an external script that achieved the same thing ... this does lend itself to your wish to create the backup via a button click on a WinForms application.


这篇关于如何通过在工作台中编写存储过程来在mysql中创建备份?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆