# ERROR: Views and There is no 'root'@'%' registered

**URL:** <https://forums.percona.com/t/error-views-and-there-is-no-root-registered/1273>\
**Category:** Other MySQL® Questions\
**Created:** [October 8, 2009, 8:54am UTC](https://forums.percona.com/t/error-views-and-there-is-no-root-registered/1273 "2009-10-08T08:54:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kedarpercona](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/kedarpercona/32/809_2.png) [@kedarpercona](https://forums.percona.com/u/kedarpercona)\
**Post date:** [October 8, 2009, 8:54am UTC](https://forums.percona.com/t/error-views-and-there-is-no-root-registered/1273/1 "2009-10-08T08:54:40Z")

</div>

OS: red hat  
mysql\> select version();  
±-----------+  
| version() |  
±-----------+  
| 5.0.22-log |  
±-----------+

mysql\> show create view myview;  
ERROR 1449 (HY000): There is no ‘root’&#64;'%’ registered  
mysql\> select current\_user();  
±---------------+  
| current\_user() |  
±---------------+  
| [root&#64;localhost](mailto:root&#64;localhost) |  
±---------------+

mysql\> show grants for current\_user();  
±---------------------------------------------------------- ----------------------------------------------------+  
| Grants for [root&#64;localhost](mailto:root&#64;localhost) |  
±---------------------------------------------------------- ----------------------------------------------------+  
| GRANT ALL PRIVILEGES ON _._ TO ‘root’&#64;‘localhost’ IDENTIFIED BY PASSWORD ‘456777ff4b3ba451’ WITH GRANT OPTION |  
±---------------------------------------------------------- ----------------------------------------------------+

shell\>vi myview.frm:

TYPE=VIEW  
query=SELECT …  
md5=511f2eaee7b396510e4edafce8878a8e  
updatable=0  
algorithm=0  
definer\_user=root  
definer\_host=%  
suid=1  
with\_check\_option=0  
revision=1  
timestamp=2009-08-08 11:35:32  
create-version=1

What’s wrong?  
I have Referred: [URL][MySQL Bugs: #16589: MySQL root user cannot access VIEW](http://bugs.mysql.com/bug.php?id=16589%5B/URL%5D)

---

<div class="post-metadata">

**Author:** ![januzi](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@januzi](https://forums.percona.com/u/januzi)\
**Post date:** [October 8, 2009, 10:11am UTC](https://forums.percona.com/t/error-views-and-there-is-no-root-registered/1273/2 "2009-10-08T10:11:27Z")

</div>

I’m not sure, but [root&#64;localhost](mailto:root&#64;localhost) could be != root@%  
Maybe You should set the definer\_host to the localhost ?

---

<div class="post-metadata">

**Author:** ![kedarpercona](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/kedarpercona/32/809_2.png) [@kedarpercona](https://forums.percona.com/u/kedarpercona)\
**Post date:** [October 9, 2009, 1:17am UTC](https://forums.percona.com/t/error-views-and-there-is-no-root-registered/1273/3 "2009-10-09T01:17:21Z")

</div>

I cannot even alter view as well!

---

<div class="post-metadata">

**Author:** ![januzi](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@januzi](https://forums.percona.com/u/januzi)\
**Post date:** [October 9, 2009, 3:38am UTC](https://forums.percona.com/t/error-views-and-there-is-no-root-registered/1273/4 "2009-10-09T03:38:12Z")

</div>

You could create a new view or use alter view.

---

<div class="post-metadata">

**Author:** ![kedarpercona](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/kedarpercona/32/809_2.png) [@kedarpercona](https://forums.percona.com/u/kedarpercona)\
**Post date:** [October 9, 2009, 6:57am UTC](https://forums.percona.com/t/error-views-and-there-is-no-root-registered/1273/5 "2009-10-09T06:57:01Z")

</div>

In any ways root user is not allowed to work with view.  
What could be the reason? Any thing to do with user permission?
