Mysql: The user specified as a definer ('root'@'%') does not exist
mysql5.6 搭建初始化完毕,服务器连接数据库后,客户端报错:The user specified as a definer ('root'@'%') does not exist
后网上搜索文章解决:说是因为连接视图的时候才会出现这种问题,解决方法如下:
1.root本地连接mysql
mysql -hlocalhost -uroot -p
2.grant一条权限给root,%代表任意主机,为了安全还是例如:192.168.1.%
grant all privileges on *.* to root@"%" identified by ".";
3.刷新权限
flush privileges;