I have two procedures in mysqlnamed test_proc1 and test_proc2 . I want to export the code of these two procedures, but found that the exported file does not contain anything, and I do not know why. detailed description of my question:
1. Procedure code test_proc1 :
DELIMITER $$
USE `testmanagementb`$$
DROP PROCEDURE IF EXISTS `test_proc1`$$
CREATE DEFINER=`root`@`localhost` PROCEDURE `test_proc1`()
BEGIN
SELECT * FROM system_users;
END$$
DELIMITER ;
2. Procedure code test_proc2 :
DELIMITER $$
USE `testmanagementb`$$
DROP PROCEDURE IF EXISTS `test_proc2`$$
CREATE DEFINER=`root`@`localhost` PROCEDURE `test_proc2`()
BEGIN
SELECT * FROM testcase_node;
END$$
DELIMITER ;
3. The command used to export the procedures (the database name is testmanagementb):
mysqldump -u root -p -ntdR testmanagementb > procs.sql
4. The exported result is shown below:
-- MySQL dump 10.11
--
-- Host: localhost Database: testmanagementb
-- ------------------------------------------------------
-- Server version 5.0.51b-community-nt
;
;
;
;
;
;
;
;
;
;
--
-- Dumping routines for database 'testmanagementb'
--
DELIMITER ;;
;;
;;
;;
;;
;;
;;
;;
;;
DELIMITER ;
;
;
;
;
;
;
;
;
-- Dump completed on 2014-02-24 6:03:25
My question is: Why does the exported file in step 4 contain nothing? Is there something wrong with my export team?
source
share