#1227 - Access denied; you need (at least one of) the SUPER privilege(s) for this operation
It means you don't have privileges to create the trigger with root@localhost user..
try removing definer from the trigger command:
CREATE DEFINER = root
@localhost
FUNCTION fnc_calcWalkedDistance
Simply remove "DEFINER=your user name
@localhost
" and run the SQL from phpmyadminwill works fine.
In case you are uploading an sql file on cpanel, then try and replace root with your cpanel username in your sql file.
in the case above you could write
CREATE DEFINER = control_panel_username
@localhost
FUNCTION fnc_calcWalkedDistance
then upload the file. Hope it helps