tags:

views:

38

answers:

1

Hi, Most of the stored procedures has been created as a root at % or 'someUser' @ localhost When I copy the procedure to another server, it does not work since the user 'someUser' is not there. The relevant line in dump file is shown below.

/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`%`*/ /*!50003 PROCEDURE `SP_Name`(in dt varchar(10))

How do I successfully run the procedure on other server without creating an user there?

A: 

Change the 'username' in the DEFINER clause to the user that is running on the new server.

/*!50003 CREATE*/ /*!50020 DEFINER=`[new_server_user]`@`%`*/ /*!50003 PROCEDURE `SP_Name`(in dt varchar(10))
emeraldjava