`
szgaea
  • 浏览: 212996 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

mysql创建数据库后出现Access denied for user 'root'@'%' to database ‘xxxx’

 
阅读更多
 
create database test1;

 
  创建完数据库后,通过远程连接提示

 
Access denied for user 'root'@'%' to database ‘xxxx’



  原因:创建完数据库后,需要进行授权,(在本地访问一般不会存在这个问题)。


  解决办法:

 
  执行授权

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

    xxxx代表创建的数据库;
    password为用户密码,在此为root的密码



完成后即可!

分享到:
评论
1 楼 daijope 2013-08-20  

相关推荐

Global site tag (gtag.js) - Google Analytics