• Register
0 votes
355 views

Problem :

 I am currently facing an issue with MySQL!

I am the cPanel user, and I am looking for the solution on my issue. It seems this is more specific than other people with the same error codes issues.

Please find below my code for the reference:

DELIMITER $$--
-- Functions
--
CREATE DEFINER =  `root`@`localhost` FUNCTION  `fnc_calcWalkedDistance` (
`steamid64` BIGINT UNSIGNED
) RETURNS INT( 10 ) UNSIGNEDNO SQL BEGIN DECLARE finished INTEGER DEFAULT 0;
DECLARE distance INTEGER DEFAULT 0;
DECLARE x1, x2, z1, z2 FLOAT;
DECLARE curs CURSOR FOR SELECT x, z
FROM log_positions
WHERE  `steamid` = steamid64
ORDER BY  `timestamp` DESC ;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET finished =1;
OPEN curs;
FETCH curs INTO x1, z1;
SET x2 = x1;
SET z2 = z1;
calculate : LOOPFETCH curs INTO x1, z1;
IF finished =1 THEN LEAVE calculate;
END IF ;
SET distance = distance + SQRT( POW( x2 - x1, 2 ) + POW( z2 - z1, 2 ) ) ;
-- SET distance = distance + 1;
SET x2 = x1;
SET z2 = z1;
END LOOP calculate;
CLOSE curs;
RETURN distance;
END$$

Following is the error from the code:

MySQL said: Documentation

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

6 5 3
6,930 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

It clearly says that you do not have the required privileges to create the trigger with root@localhost user.

Please remove the definer from the trigger command as shown below:

CREATE DEFINER = root@localhost FUNCTION fnc_calcWalkedDistance

9 7 4
38,600 points

Related questions

0 votes
1 answer 1 view
1 view
Problem: I came across with this problem > If you are the owner of this website, please contact your hosting provider
asked 4 days ago ummeshani 8.8k points
0 votes
1 answer 7 views
7 views
Problem: when I try to import the database into the environment, I keep getting this error: 1273 - Unknown collation: 'utf8mb4_unicode_ci' Please help!
asked Mar 16 ummesalma 29.2k points
0 votes
1 answer 13 views
13 views
Problem: I have the following validation: class Event < ActiveRecord::Base attr_accessible :starts, :ends validates :no_multi_day_events private def no_multi_day_events if (ends.day != starts.day) errors.add(:ends, "No multi-day events") end end end However, when I try to load a page with this text, I get an error: You need to supply at least one validation How do I supply the validation?
asked Mar 5 ummesalma 29.2k points
0 votes
1 answer 4 views
4 views
Problem: (I'm not a native speaker of English.Please forgive my terrible english.) I have a private organization on github like this: https://github.com/xxx-technology this organization includes two repositories: repository A repository B I invited *Emails are not allowed* ... So how can I invite an exist outside collaborator to a new repository when there is no seats left. Would love some help!
asked 5 days ago ochena 22.1k points
0 votes
1 answer 5 views
5 views
Problem: The uploaded file exceeds the upload_max_filesize directive in php.ini. cpanel.
asked Apr 28 Ryan evans 540 points
0 votes
1 answer 105 views
105 views
Problem: Please help me to find out the solution of it ... The process class relies on proc_open, which is not available on your php installation.
asked Apr 1 Ifra 34.7k points
1 vote
1 answer 5 views
5 views
Problem: Can anyone tell me the solution of this problem? you do not have the super privilege and binary logging is enabled
asked Apr 6 MUHAMMAD MUNEEB 83k points
0 votes
1 answer 5 views
5 views
Problem: Sometimes I get this error message when trying to move, rename, or otherwise manipulate some files or folders on my computer... Destination Folder Access Denied You need permission to perform this action http://img222.imageshack.us/img222/1581/destinationfolderaccessms9.jpg What do I need to do to gain control?
asked 1 day ago sumaiya simi 43.9k points
0 votes
1 answer 2 views
2 views
Problem: Sometimes I get this error message when trying to move, rename, or otherwise manipulate some files or folders on my computer... Destination Folder Access Denied You need permission to perform this action http://img222.imageshack.us/img222/1581/destinationfolderaccessms9.jpg What do I need to do to gain control?
asked 4 days ago Supti 12.7k points
0 votes
1 answer 5 views
5 views
Problem: Sometimes I get this error message when trying to move, rename, or otherwise manipulate some files or folders on my computer... Destination Folder Access Denied You need permission to perform this action http://img222.imageshack.us/img222/1581/destinationfolderaccessms9.jpg What do I need to do to gain control?
asked 4 days ago ochena 22.1k points