Import MySQL Stored Procedure Problem

Software:

I used PHPMyAdmin in localhost and Server

Known:

I create stored procedure in localhost and export with result like this one below:

DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `periksaLogin`(IN `uname` VARCHAR(20) CHARSET utf8, IN `pass` VARCHAR(50) CHARSET utf8, IN `idToko` INT(11), IN `stat` INT(1))
    NO SQL
SELECT * FROM apiauth_staff WHERE username = uname  and password = pass
and idstore=idToko and status=stat$$
DELIMITER ;

Problem:

When i copy above stored procedure to SQL Tab in Server PHPMyadmin then error appeared like this:

#1227 - Access denied; you need (at least one of) the SUPER privilege(s) for this operation

Question:

How to fix it … ?

Answer:

Just remove the definer “DEFINER=root@localhost

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *