MySQL-mysqldump-例程仅导出1个存储过程(按名称),而不是每个例程 [英] MySQL - mysqldump --routines to only export 1 stored procedure (by name) and not every routine

查看:210
本文介绍了MySQL-mysqldump-例程仅导出1个存储过程(按名称),而不是每个例程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我们从导出中获得了很多例程.我们通常需要在CLI中进行处理,进行更改,然后将其重新带回.是的,其中一些是由不同人员管理的,需要更好的更改控制,但这是目前的情况.

So we have a lot of routines that come out from exporting. We often need to get these out in CLI, make changes, and bring them back in. Yes, some of these are managed by different folks and a better change control is required, but for now this is the situation.

如果我这样做:

mysqldump --routines --no-create-info --no-data --no-create-db

那太好了,我有200个功能.我需要浏览一个文件才能找到我想要的一个或一组.

then great, I have 200 functions. I need to go through a file to find just the one or set I want.

反正我想要的mysqldump例程存在吗?

Is there anyway to mysqldump routines that I want like there is for tables?

推荐答案

要回答您的确切问题:否.

To answer your exact question: no.

但这可能会给您您想要的东西.

But this will probably give you what you want.

看看SHOW CREATE PROCEDURESHOW CREATE FUNCTION:

http://dev.mysql.com /doc/refman/5.0/en/show-create-procedure.html

http://dev.mysql.com /doc/refman/5.0/en/show-create-function.html

这些命令允许您一次转储一个例程的代码.

Those commands allow you to dump the code for one routine at a time.

这篇关于MySQL-mysqldump-例程仅导出1个存储过程(按名称),而不是每个例程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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