查询数据库中的存储过程和函数
方法一:
select `name` from mysql.proc where db = 'your_db_name' and `type` = 'PROCEDURE'   //存储过程
select `name` from mysql.proc where db = 'your_db_name' and `type` = 'FUNCTION'   //函数
方法二:
show procedure status; //存储过程
show function status;     //函数

查看存储过程或函数的创建代码
show create procedure proc_name;
show create function func_name;


mysql导出存储过程或函数:

mysqldump -hhostname -uusername -ppassword -ntd -R databasename > backupflie.sql

其中的 -ntd 是表示导出存储过程;-R是表示导出函数