访问网站出现Access denied for user 'root'@'%' to database 'xxx'

在linux下连接了数据库之后,网页上显示Access denied for user 'root'@'%' to database 'xxx'的字样时, 通过数据库授权:

grant all on xxx.* to 'root'@'%' identified by 'password' with grant option;

其中:xxx代表创建的数据库; password为用户密码。

posted @ 2017-06-19 14:02  我,胖虎  阅读(1006)  评论(0)    收藏  举报