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

**URL:** <https://forums.percona.com/t/problem-in-upgrade-from-5-0-22-mysql-to-5-5-21-percona/1785>\
**Category:** Other MySQL® Questions\
**Created:** [March 28, 2012, 7:37pm UTC](https://forums.percona.com/t/problem-in-upgrade-from-5-0-22-mysql-to-5-5-21-percona/1785 "2012-03-28T19:37:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![justlooks](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@justlooks](https://forums.percona.com/u/justlooks)\
**Post date:** [March 28, 2012, 7:37pm UTC](https://forums.percona.com/t/problem-in-upgrade-from-5-0-22-mysql-to-5-5-21-percona/1785/1 "2012-03-28T19:37:38Z")

</div>

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’

---

<div class="post-metadata">

**Author:** ![xaprb](https://avatars.discourse-cdn.com/v4/letter/x/49beb7/32.png) [@xaprb](https://forums.percona.com/u/xaprb)\
**Post date:** [March 28, 2012, 10:18pm UTC](https://forums.percona.com/t/problem-in-upgrade-from-5-0-22-mysql-to-5-5-21-percona/1785/2 "2012-03-28T22:18:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![justlooks](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@justlooks](https://forums.percona.com/u/justlooks)\
**Post date:** [March 28, 2012, 11:50pm UTC](https://forums.percona.com/t/problem-in-upgrade-from-5-0-22-mysql-to-5-5-21-percona/1785/3 "2012-03-28T23:50:11Z")

</div>

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  
Create\_view\_priv:  
Show\_view\_priv:  
Create\_routine\_priv:  
Alter\_routine\_priv:  
Create\_user\_priv:  
Event\_priv: Y  
Trigger\_priv: Y  
Create\_tablespace\_priv: Y  
ssl\_type:  
ssl\_cipher: 0  
x509\_issuer:  
x509\_subject:  
max\_questions: 0  
max\_updates: 0  
max\_connections: 0  
max\_user\_connections: 0  
plugin:  
authentication\_string: NULL

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