problem in upgrade from 5.0.22(mysql) to 5.5.21(percona)

yesterday i try to upgrade my DB from mysql5.0.22 to percona5.5.21
first i backup the data,and remove mysql5.0.22,install percona5.5.21,after start up ,i run mysql_upgrade to update system table,but failed

trade_lead_bak.trade1 OK
Running ‘mysql_fix_privilege_tables’…
ERROR 1370 (42000) at line 1111: alter routine command denied to user ‘root’@‘localhost’ for routine ‘mysql.die’
ERROR 1044 (42000) at line 1112: Access denied for user ‘root’@‘localhost’ to database ‘mysql’
ERROR 1370 (42000) at line 1125: alter routine command denied to user ‘root’@‘localhost’ for routine ‘mysql.die’
FATAL ERROR: Upgrade failed

but root@localhost can visit mysql,why???

mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed

i try this but failed

mysql> create procedure mysql.die() signal sqlstate ‘HY000’ set message_text=‘Unexpected content found in the performance_schema database.’;
ERROR 1044 (42000): Access denied for user ‘root’@‘localhost’ to database ‘mysql’

You may have anonymous user accounts in your database. Connect again and type SHOW GRANTS. Note whom it reports the grants are given to!

the reason is root user has no privileges of create routine
and question is how can root user grant privileges which he is not own ??

ok i figured it out, start mysql with --skip-grant-tables,then
reset the privileges

mysql> select * from mysql.user where user=‘root’\G
*************************** 1. row ***************************
Host: localhost
User: root
Password: 134c99b462c6a90b
Select_priv: Y
Insert_priv: Y
Update_priv: Y
Delete_priv: Y
Create_priv: Y
Drop_priv: Y
Reload_priv: Y
Shutdown_priv: Y
Process_priv: Y
File_priv: Y
Grant_priv: Y
References_priv: Y
Index_priv: Y
Alter_priv: Y
Show_db_priv: Y
Super_priv: Y
Create_tmp_table_priv: Y
Lock_tables_priv: Y
Execute_priv: Y
Repl_slave_priv: Y
Repl_client_priv: Y
Event_priv: Y
Trigger_priv: Y
Create_tablespace_priv: Y
ssl_cipher: 0
max_questions: 0
max_updates: 0
max_connections: 0
max_user_connections: 0
authentication_string: NULL

mysql> grant all on . to ‘root’@‘localhost’;
ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: NO)