问题描述
因此,我们从导出中获得了很多例程.我们通常需要在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 PROCEDURE
和SHOW 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个存储过程(按名称),而不是每个例程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!