I need to copy all the stored procedures from one schema to another programmatically with an SQL script.
How can I do this in MySQL? I don't want to have to run a PHP script.
Thank you
EDIT: I am on MySQL 8. Table mysql.proc doesn't exist. Also, the schemas are on the same server.
解决方案
like
mysqldump --routines --no-create-info --no-data --no-create-db --skip-opt yourdb > yourdb.sql
and import into the new one
mysql -u root -p yournewdb < yourdb.sql