I have configured an Azure Database for MySQL and able to connect to it successfully. I am also able to create New Tables and run queries on those tables but when creating a stored procedure, I am getting below error:-
Er 1227. Access error Code: denied; you need (at least one of) the SUPER privilege(s) for this operation
Example procedures is tried is
DELIMITER $$
CREATE DEFINER='user'@'server'
PROCEDURE `sp_getComplaintsByBranchCode`(
in branchCode Varchar(50),
in companyCode Varchar(50),
in RowsPerPage INT,
in pageNumber INT
)
NOT DETERMINISTIC NO SQL SQL SECURITY DEFINER
BEGIN
DECLARE pageFrom INT;
DECLARE rowLimit INT;
DECLARE companyid varchar(50);
DECLARE branchid varchar(50);
DECLARE offval INT;
SET pageFrom = pageNumber;
SET rowLimit = RowsPerPage;
SET branchid = branchCode;
SET companyid = companyCode;
SET offval = ((pageFrom-1) * rowLimit);
select * from complaints c
WHERE c.branchCode = branchid AND c.fb_companyID = companyid
ORDER BY added_on DESC limit rowLimit OFFSET offval;
END
I checked user permissions and the database admin user which got created during initial setup doesn't have super privileges. The only user with super privileges is "azure_superuser" and I don't have connection password for it. Please help me with below issues or point me to some references which can help:-
1) How to connect to 'azure_superuser' OR 2) How to grant superuser privileges to the admin user I have without login as root user. 3) How to enable a user with super_priviledge as 'N' to create stored procedures in Azure database for MySQL.
Some references:-