am facing this issue when i try to import database into my Cpanel
and this error occured
“#1227 – Access denied; you need (at least one of) the SUPER privilege(s) for this operation”
Also, my database has 24 tables but affter this error only 20 tables imoorted.
Although database workes fine in other hosting and localhos
Here is the error:
Error
SQL query: Documentation
—
— Functions
CREATE DEFINER=ato-qms-u-137073
@%
FUNCTION calculate_daily_rate
(in_fleet_id
INT, in_booking_days
INT, in_booking_hours_per_day
INT) RETURNS FLOAT BEGIN
declare fare float;
declare min_booking_days int;
declare min_booking_hours_per_day int;
declare min_booking_days_amount float;
declare rate_per_day float;
SELECT
f.min_booking_days, f.min_booking_hours_per_day, f.min_booking_days_amount, f.rate_per_day
INTO min_booking_days, min_booking_hours_per_day, min_booking_days_amount, rate_per_day
FROM fleet f
WHERE f.id = in_fleet_id;
if(in_booking_hours_per_day < min_booking_hours_per_day) then
return 0;
end if;
if(in_booking_days < min_booking_days) then
return 0;
end if;
SET fare = min_booking_days_amount + (in_booking_days - min_booking_days) * rate_per_day;
return fare;
END
MySQL said: Documentation
2
Answers
Error is because you do not have privileges to create trigger with this user
ato-qms-u-137073@%.
Just remove this line from the code and it should work.
I think you solved it. But i’ll laeve the answer here.
I edited database with notepad++, and deleted "Definer = your username @ local host".
Saved and tried again, for me it worked.